Skip to content

Commit

Permalink
ci: installed destination based on matrix.os in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhulbert committed Oct 18, 2023
1 parent 345aa79 commit 4afba7c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/maven-build-all-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ jobs:
cache: 'maven'
- name: "Build with Maven"
if: matrix.os != 'macos-latest' && matrix.os != 'macOS-ARM64'
run: mvn -B clean install -DskipTests -Pbuild-installer --file pom.xml
run: mvn -B clean install -DskipTests -Pbuild-installer -Dmatrix.os=${{ matrix.os }} --file pom.xml
- name: "Build with Maven (macOS No Signing)"
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
if: ${{ env.MACOS_CERTIFICATE == null && (matrix.os == 'macos-latest' || matrix.os == 'macOS-ARM64') }}
run: mvn -B clean install -DskipTests -Pbuild-installer --file pom.xml
run: mvn -B clean install -DskipTests -Pbuild-installer -Dmatrix.os=${{ matrix.os }} --file pom.xml
- name: Update Automatic Release
uses: marvinpinto/action-automatic-releases@latest
if: ${{ env.RELEASE_INSTALLERS }}
Expand All @@ -68,6 +68,4 @@ jobs:
title: ${{ matrix.os }} Development Build
files: |
${{ env.DMG_PATH }}
./target/*.msi
./target/*.dmg
./target/*.deb
./target/installer-${{ matrix.os }}/*
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,9 @@
<profiles>
<profile>
<id>build-installer</id>
<properties>
<matrix.os>${os.name}</matrix.os>
</properties>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -1031,6 +1034,7 @@
<!--suppress UnresolvedMavenProperty -->
<mainJar>${project.build.finalName}.jar</mainJar>
<toolName>jpackage</toolName>
<dest>${project.build.directory}/installer-${matrix.os}</dest>
<writeOutputToLog>true</writeOutputToLog>
<writeErrorsToLog>true</writeErrorsToLog>
<failOnError>true</failOnError>
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/linux/jpackage.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--verbose
--name ${app.name}
--icon "${project.basedir}/img/icons/icon-draft.png"
--dest "${project.build.directory}"
--dest "${project.build.directory}/installer-${matrix.os}"
--main-class ${main-class}
--input "${project.build.directory}/dependency"
--runtime-image "${project.build.directory}/jvm-image"
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/osx/jpackage.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--name ${app.name}
--icon "${project.basedir}/img/icons/icon-draft.icns"
--dest "${project.build.directory}"
--dest "${project.build.directory}/installer-${matrix.os}"
--main-class ${main-class}
--input "${project.build.directory}/dependency"
--runtime-image "${project.build.directory}/jvm-image"
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/windows/jpackage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
--win-menu-group ${windows.vendor}
--vendor ${windows.vendor}
--icon "${project.basedir}/img/icons/icon-draft.ico"
--dest "${project.build.directory}"
--dest "${project.build.directory}/installer-${matrix.os}"
--main-class ${main-class}
--input "${project.build.directory}/dependency"
--runtime-image "${project.build.directory}/jvm-image"
Expand Down

0 comments on commit 4afba7c

Please sign in to comment.