Skip to content

Commit

Permalink
Merge pull request #63 from AkshathSai/AkshathSai-patch-2
Browse files Browse the repository at this point in the history
Update ci-build.yml
  • Loading branch information
AkshathSai authored Oct 17, 2024
2 parents c6379da + a9e97be commit d5bbe05
Showing 1 changed file with 40 additions and 13 deletions.
53 changes: 40 additions & 13 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '23' ]
maven: [ '3.9.6' ]
#os: [ 'macos-12', 'ubuntu-22.04', 'windows-2022' ]
os: [ 'ubuntu-22.04' ]
java: ['23']
maven: ['3.9.6']
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' }}
Expand All @@ -28,14 +28,7 @@ jobs:
git config --global core.eol crlf
- name: Checkout
if: github.head_ref == ''
uses: actions/checkout@v3

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

- name: Set up Cache
uses: actions/cache@v3
Expand All @@ -57,12 +50,46 @@ jobs:
with:
maven-version: ${{ matrix.maven }}

- name: Build
- name: Build and Package
id: build
run: mvn clean verify -B -U
run: mvn clean package -B
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
- name: Archive JAR
if: success()
uses: actions/upload-artifact@v3
with:
name: streamspace-jar
path: target/*.jar

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Create GitHub 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 }}"
draft: false
prerelease: false
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/*.jar
asset_name: streamspace-${{ github.run_number }}.jar
asset_content_type: application/java-archive

0 comments on commit d5bbe05

Please sign in to comment.