-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added compatibility to macOS on arm64 architecture
- Loading branch information
Showing
1 changed file
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,70 @@ on: | |
- 'r*' | ||
|
||
jobs: | ||
build-macos-app: | ||
build-macos-silicon-app: | ||
runs-on: macos-14 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
submodules: recursive | ||
- name: "Set up JDK 17" | ||
id: setup-java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "liberica" | ||
java-version: "17" | ||
architecture: arm64 | ||
- name: "Decode signing certificate" | ||
run: | | ||
echo ${{ secrets.CERT_B64 }} | base64 -d | zcat > desktopApp/macos-dev.cer | ||
- name: "Import signing certificate" | ||
uses: apple-actions/import-codesign-certs@v3 | ||
with: | ||
p12-filepath: desktopApp/macos-dev.cer | ||
p12-password: ${{ secrets.CERT_PASSWD }} | ||
- name: "Setup build env" | ||
run: | | ||
python .github/setup_gradle_properties_release.py tag=${{ github.ref_name }} | ||
- name: "Setup signing config" | ||
run: | | ||
echo "" >> gradle.properties | ||
echo "cert_identity=${{ secrets.CERT_IDENTITY }}" >> gradle.properties | ||
- name: "Setup notarization config" | ||
run: | | ||
echo "" >> gradle.properties | ||
echo "notarization_apple_id=${{ secrets.NOTARIZATION_APPLE_ID }}" >> gradle.properties | ||
echo "notarization_password=${{ secrets.NOTARIZATION_PASSWD }}" >> gradle.properties | ||
echo "notarization_asc_provider=${{ secrets.NOTARIZATION_ASC_PROVIDER }}" >> gradle.properties | ||
- name: "Setup Gradle" | ||
uses: gradle/actions/setup-gradle@v4 | ||
env: | ||
JAVA_HOME: ${{ steps.setup-java.outputs.path }} | ||
- name: "Build" | ||
run: ./gradlew :desktopApp:packageDmg :desktopApp:notarizeDmg | ||
- name: "Upload logs" | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: logs-mac | ||
path: desktopApp/build/compose/logs/**/*.txt | ||
retention-days: 30 | ||
- name: "Upload binaries" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binaries-mac | ||
path: desktopApp/build/compose/binaries/main/** | ||
retention-days: 1 | ||
- name: "Upload .dmg" | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-mac-silicon | ||
path: desktopApp/build/compose/binaries/main/dmg/*.dmg | ||
retention-days: 1 | ||
build-macos-intel-app: | ||
runs-on: macos-12 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -65,7 +128,7 @@ jobs: | |
- name: 'Upload .dmg' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-mac | ||
name: app-mac-intel | ||
path: desktopApp/build/compose/binaries/main/dmg/*.dmg | ||
retention-days: 1 | ||
build-linux-flatpak-app: | ||
|
@@ -183,7 +246,8 @@ jobs: | |
needs: | ||
- build-android-app | ||
- build-linux-flatpak-app | ||
- build-macos-app | ||
- build-macos-silicon-app | ||
- build-macos-intel-app | ||
- build-windows-app | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -197,10 +261,15 @@ jobs: | |
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
- name: "Download Mac app" | ||
- name: "Download Mac app (Intel)" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: app-mac-intel | ||
path: artifacts | ||
- name: "Download Mac app (Apple Silicon)" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: app-mac | ||
name: app-mac-silicon | ||
path: artifacts | ||
- name: "Download Linux app" | ||
uses: actions/download-artifact@v4 | ||
|