Skip to content

Commit

Permalink
Increment windows app version
Browse files Browse the repository at this point in the history
  • Loading branch information
paytoncain committed Aug 3, 2024
1 parent df39840 commit cb8f9bd
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ jobs:
matrix:
os: [ windows-2019 ]
runs-on: ${{ matrix.os }}
outputs:
appver: ${{ steps.appver.outputs.appver }}
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -391,16 +393,34 @@ jobs:
with:
name: gui-icons
path: icons
- name: Package jar as exe application
- id: appver
run: |
appver=$(date +%y.%m.%d%H)
jpackage --verbose --dest application --name "pace" -i jars --main-class edu.colorado.cires.pace.gui.Application --main-jar pace-gui-${{ needs.build.outputs.version }}.jar -t exe --icon icons/pace.ico --vendor "CIRES - University of Colorado" --win-shortcut --win-menu --win-dir-chooser --win-per-user-install --app-version $appver
echo "appver=$(date +%y.%m.%d%H)" >> $GITHUB_OUTPUT
echo "appver=$(date +%y.%m.%d%H)" >> $GITHUB_ENV
shell: bash
- name: Package jar as exe application
run: >
jpackage
--verbose
--dest application
--name "pace"
-i jars
--main-class edu.colorado.cires.pace.gui.Application
--main-jar
pace-gui-${{ needs.build.outputs.version }}.jar
-t exe
--icon icons/pace.ico
--vendor "CIRES - University of Colorado"
--win-shortcut
--win-menu
--win-dir-chooser
--win-per-user-install
--app-version ${{ env.appver }}
- name: Upload application
uses: actions/upload-artifact@v4
with:
name: pace-gui-${{ env.os }}-${{ env.arch }}
path: application
path: "application/*.exe"

release:
needs:
Expand All @@ -410,7 +430,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
- run: mkdir release
- run: zip -r release/pace-gui-Windows-X64-${{ needs.build.outputs.version }}.zip pace-gui-Windows-X64
- run: cp pace-gui-Windows-X64/pace-${{ needs.package-gui-windows.outputs.appver }}.exe release/pace-gui-Windows-X64-${{ needs.build.outputs.version }}.exe
- run: cp cli-jar/* release/pace-cli-${{ needs.build.outputs.version }}-exe.jar
- run: cp gui-jar/* release/pace-gui-${{ needs.build.outputs.version }}-exe.jar
- run: zip -r release/pace-json-schema-${{ needs.build.outputs.version }}.zip json-schema
Expand Down

0 comments on commit cb8f9bd

Please sign in to comment.