Skip to content

Commit

Permalink
Updating Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Schnaufer committed Sep 4, 2024
1 parent 9e48ced commit a57655d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest, macos-14]
include:
- platform: ubuntu-latest
jar_file_name: sparcd-ubuntu-latest.jar
- platform: windows-latest
jar_file_name: sparcd-windows-latest.jar
- platform: macos-latest
jar_file_name: macos-latest.jar
- platform: macos-14
jar_file_name: sparcd-AppleSilicon.jar
extra_maven_flags: -Denv=AppleSilicon

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -27,20 +37,15 @@ jobs:
java-version: 21

- name: Build with Maven
if: ${{ matrix.platform != 'macos-14' }}
run: cd "Sanimal FX" && mvn -U compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../sparcd-${{ matrix.platform }}.jar

- name: Build with Maven Mac Silicon
if: ${{ matrix.platform == 'macos-14' }}
run: cd "Sanimal FX" && mvn -U -Denv=MacSilicon compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../sparcd-MacSilicon.jar
run: cd "Sanimal FX" && mvn -U ${{ extra_maven_flags }} compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../${{ matrix.jar_file_name }}

- name: Upload prerelease assets
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Prerelease Build
files: sparcd-${{ matrix.platform }}.jar
files: ${{ matrix.jar_file_name }}
draft: true
prerelease: true
fail_on_unmatched_files: true
16 changes: 13 additions & 3 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [ubuntu-latest, windows-latest, macos-latest, macos-14]
include:
- platform: ubuntu-latest
jar_file_name: sparcd-ubuntu-latest.jar
- platform: windows-latest
jar_file_name: sparcd-windows-latest.jar
- platform: macos-latest
jar_file_name: macos-latest.jar
- platform: macos-14
jar_file_name: sparcd-AppleSilicon.jar
extra_maven_flags: -Denv=AppleSilicon

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -26,7 +36,7 @@ jobs:
java-version: 21

- name: Build with Maven
run: cd "Sanimal FX" && mvn -U compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../sparcd-${{ matrix.platform }}.jar
run: cd "Sanimal FX" && mvn -U ${{ extra_maven_flags }} compile package && mv target/SanimalFX-1.0-SNAPSHOT-jar-with-dependencies.jar ../${{ matrix.jar_file_name }}

- name: set date env var
if: ${{ matrix.platform != 'windows-latest' }}
Expand All @@ -42,7 +52,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release Build ${{ env.NOW }}
files: sparcd-${{ matrix.platform }}.jar
files: ${{ matrix.jar_file_name }}
draft: false
prerelease: false
fail_on_unmatched_files: true
Expand Down
6 changes: 3 additions & 3 deletions Sanimal FX/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
</properties>
</profile>
<profile>
<!-- Enable by using "-DMacSilicon" on Maven command line -->
<id>MacSilicon</id>
<!-- Enable by using "-Denv=AppleSilicon" on Maven command line -->
<id>AppleSilicon</id>
<activation>
<property>
<name>env</name>
<value>MacSilicon</value>
<value>AppleSilicon</value>
</property>
</activation>
<properties>
Expand Down

0 comments on commit a57655d

Please sign in to comment.