Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshathSai committed Oct 20, 2024
2 parents 9a8f08c + 974e21e commit 96050ee
Showing 1 changed file with 26 additions and 32 deletions.
58 changes: 26 additions & 32 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,12 @@ jobs:
matrix:
java: [ '23' ]
maven: [ '3.9.6' ]
#os: [ 'macos-12', 'ubuntu-22.04', 'windows-2022' ]
os: [ 'ubuntu-22.04' ]
name: Build (Java ${{ matrix.java }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- name: Set up line endings
if: ${{ matrix.os == 'windows-2022' }}
run: |
git config --global core.autocrlf false
git config --global core.eol crlf
- name: Checkout
if: github.head_ref == ''
uses: actions/checkout@v3

- name: Checkout merge
if: github.head_ref != ''
- name: Checkout code
uses: actions/checkout@v3
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge

- name: Set up Cache
uses: actions/cache@v3
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
Expand All @@ -57,12 +34,29 @@ jobs:
with:
maven-version: ${{ matrix.maven }}

- name: Build
id: build
run: mvn clean verify -B -U
- name: Build the JAR
run: mvn clean package -B -U

- name: Verify JAR creation
run: ls -al target

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.run_number }}
name: "Release v${{ github.run_number }}"
body: "Automated release for build #${{ github.run_number }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload JAR to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/streamspace-0.0.1.jar # Update the JAR name as needed
asset_name: streamspace-${{ github.run_number }}.jar
asset_content_type: application/java-archive
env:
MAVEN_OPTS: >-
-Xmx2g
-Dmaven.wagon.http.retryHandler.count=5
-Dmaven.wagon.httpconnectionManager.ttlSeconds=25
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 96050ee

Please sign in to comment.