77 workflow_dispatch : # Manual trigger from the GitHub UI
88
99jobs :
10- mac-intel :
11- runs-on : macos-13 # Intel runner
10+ macos :
11+ runs-on : macos-latest # ARM runner (Apple Silicon, works on Intel via Rosetta 2)
1212 steps :
1313 - uses : actions/checkout@v4
1414
2828 - name : Build .jar
2929 run : mvn clean package
3030
31- - name : Run jpackage for macOS Intel
31+ - name : Run jpackage for macOS
3232 run : |
3333 jpackage \
3434 --type dmg \
@@ -41,59 +41,14 @@ jobs:
4141 --vendor "Ledhed2222" \
4242 --icon src/main/resources/logo.icns
4343
44- - name : Rename DMG to include architecture
44+ - name : Rename DMG
4545 run : |
46- mv target/EWItool-${{ steps.version.outputs.version }}.dmg target/EWItool-${{ steps.version.outputs.version }}-macos-intel .dmg
46+ mv target/EWItool-${{ steps.version.outputs.version }}.dmg target/EWItool-${{ steps.version.outputs.version }}-macos.dmg
4747
4848 - name : Upload to gh release
4949 uses : softprops/action-gh-release@v1
5050 with :
51- files : target/*-macos-intel.dmg
52- env :
53- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54-
55- mac-silicon :
56- runs-on : macos-latest # ARM runner (M1/M2)
57- steps :
58- - uses : actions/checkout@v4
59-
60- - name : Set up JDK 21
61- uses : actions/setup-java@v4
62- with :
63- distribution : temurin
64- java-version : 21
65-
66- - name : Extract version from pom.xml
67- id : version
68- run : |
69- VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
70- echo "version=$VERSION" >> $GITHUB_OUTPUT
71- echo "Building version: $VERSION"
72-
73- - name : Build .jar
74- run : mvn clean package
75-
76- - name : Run jpackage for macOS Silicon
77- run : |
78- jpackage \
79- --type dmg \
80- --name EWItool \
81- --input target \
82- --main-jar EWItool-${{ steps.version.outputs.version }}.jar \
83- --main-class com.github.ledhed2222.ewitool.Main \
84- --dest target \
85- --app-version ${{ steps.version.outputs.version }} \
86- --vendor "Ledhed2222" \
87- --icon src/main/resources/logo.icns
88-
89- - name : Rename DMG to include architecture
90- run : |
91- mv target/EWItool-${{ steps.version.outputs.version }}.dmg target/EWItool-${{ steps.version.outputs.version }}-macos-silicon.dmg
92-
93- - name : Upload to gh release
94- uses : softprops/action-gh-release@v1
95- with :
96- files : target/*-macos-silicon.dmg
51+ files : target/*-macos.dmg
9752 env :
9853 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9954
0 commit comments