Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paytoncain committed Apr 23, 2024
1 parent 813636b commit 7f1cefc
Showing 1 changed file with 42 additions and 2 deletions.
44 changes: 42 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ jobs:
-i jars
--main-class edu.colorado.cire.pace.cli.Application
--main-jar pace-cli-${{ needs.build.outputs.version }}-jar-with-dependencies.jar
- name: View artifacts
run: ls -l
- name: Upload app image
uses: actions/upload-artifact@v4
with:
name: pace-cli-${{ env.os }}-${{ env.arch }}
path: "*.app"

package-linux:
needs: build
strategy:
Expand Down Expand Up @@ -110,17 +109,58 @@ jobs:
with:
name: pace-cli-${{ env.os }}-${{ env.arch }}
path: "pace-cli"

package-windows:
needs: build
strategy:
matrix:
os: [ windows-2019 ]
runs-on: ${{ matrix.os }}
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set os/arch environment variables
run: |
echo "os=${RUNNER_OS}" >> $GITHUB_ENV
echo "arch=${RUNNER_ARCH}" >> $GITHUB_ENV
- name: Download Jar
uses: actions/download-artifact@v4
with:
name: jar-with-dependencies
path: jars
- name: Package jar as app-image
run: >
jpackage
--type app-image
--verbose
--vendor 'CIRES - University of Colorado'
--name 'pace-cli'
-i jars
--dest application
--main-class edu.colorado.cire.pace.cli.Application
--main-jar pace-cli-${{ needs.build.outputs.version }}-jar-with-dependencies.jar
- name: Upload app image
uses: actions/upload-artifact@v4
with:
name: pace-cli-${{ env.os }}-${{ env.arch }}
path: application

release:
needs:
- package-osx
- package-linux
- package-windows
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: mkdir release
- run: zip -r release/pace-cli-Linux-X64-${{ needs.build.outputs.version }}.zip pace-cli-Linux-X64
- run: zip -r release/pace-cli-macOS-ARM64-${{ needs.build.outputs.version }}.zip pace-cli-macOS-ARM64
- run: zip -r release/pace-cli-macOS-X64-${{ needs.build.outputs.version }}.zip pace-cli-macOS-X64
- run: zip -r release/pace-cli-Windows-X64-${{ needs.build.outputs.version }}.zip pace-cli-Windows-X64
- name: Update branch release
uses: eine/tip@master
with:
Expand Down

0 comments on commit 7f1cefc

Please sign in to comment.