diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 4418ba0bc..32e441be2 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -25,7 +25,14 @@ jobs: - runtime: osx-x64 arch: x64 - os: macOS-latest + os: macOS-12 + shell: bash + build: packageReleaseUberJarForCurrentOS packageReleaseDmg notarizeReleaseDmg + setupCl: ./scripts/SetupClUnix.sh + + - runtime: osx-arm64 + arch: aarch64 + os: macOS-14 shell: bash build: packageReleaseUberJarForCurrentOS packageReleaseDmg notarizeReleaseDmg setupCl: ./scripts/SetupClUnix.sh @@ -68,7 +75,7 @@ jobs: - name: Setup MacOS Keychain uses: apple-actions/import-codesign-certs@v2 - if: ${{ matrix.runtime == 'osx-x64' }} + if: ${{ matrix.runtime == 'osx-x64' || matrix.runtime == 'osx-arm64' }} with: p12-file-base64: ${{ secrets.APPLE_CERT }} p12-password: ${{ secrets.APPLE_CERT_PASSWORD }} diff --git a/.github/workflows/Preview.yml b/.github/workflows/Preview.yml index 95962c120..270273d6c 100644 --- a/.github/workflows/Preview.yml +++ b/.github/workflows/Preview.yml @@ -30,6 +30,13 @@ jobs: build: packageReleaseUberJarForCurrentOS packageReleaseDmg notarizeReleaseDmg setupCl: ./scripts/SetupClUnix.sh + - runtime: osx-arm64 + arch: aarch64 + os: macOS-14 + shell: bash + build: packageReleaseUberJarForCurrentOS packageReleaseDmg notarizeReleaseDmg + setupCl: ./scripts/SetupClUnix.sh + - runtime: win-x64 arch: x64 os: windows-latest @@ -68,7 +75,7 @@ jobs: - name: Setup MacOS Keychain uses: apple-actions/import-codesign-certs@v2 - if: ${{ matrix.runtime == 'osx-x64' }} + if: ${{ matrix.runtime == 'osx-x64' || matrix.runtime == 'osx-arm64' }} with: p12-file-base64: ${{ secrets.APPLE_CERT }} p12-password: ${{ secrets.APPLE_CERT_PASSWORD }} diff --git a/scripts/NamingFix.sh b/scripts/NamingFix.sh index 9d9b5ae9d..0bfd3f727 100755 --- a/scripts/NamingFix.sh +++ b/scripts/NamingFix.sh @@ -16,15 +16,25 @@ if [ -f "$msi" ]; then fi fi -dmg="$(find ./ -iname '*.dmg' 2>/dev/null)" -if [ -f "$dmg" ]; then - dir="$(dirname "$dmg")" - version=$(tmp="${dmg%.*}" && echo "${tmp##*-}") +# Find DMG +dmg_dirs="$(find ./ -type d -iname '*-macos-*' 2>/dev/null)" +for dir in $dmg_dirs; do + arch=$(basename "$dir" | cut -d'-' -f3) # Extract architecture from directory name + dmg="$dir/*.dmg" + if [ "$(ls -A $dir/*.dmg 2>/dev/null)" ]; then + version=$(tmp=$(basename $dir/*.dmg .dmg) && echo "${tmp##*-}") - if [ "$(basename "$dmg")" != "$name-macos-x64-$version.dmg" ]; then - mv "$dmg" "$dir/$name-macos-x64-$version.dmg" + if [ "$arch" == "x64" ]; then + if [ "$(basename $dir/*.dmg)" != "$name-macos-x64-$version.dmg" ]; then + mv $dir/*.dmg "$dir/$name-macos-x64-$version.dmg" + fi + elif [ "$arch" == "arm64" ]; then + if [ "$(basename $dir/*.dmg)" != "$name-macos-arm64-$version.dmg" ]; then + mv $dir/*.dmg "$dir/$name-macos-arm64-$version.dmg" + fi + fi fi -fi +done apk="$(find ./ -iname '*.apk' 2>/dev/null)" if [ -f "$apk" ]; then