diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0a1ce2..d4dfffe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -164,10 +164,26 @@ jobs: @executable_path/../Frameworks/libfreetype.6.dylib target/${{ matrix.target }}/release/bundle/osx/Gopher64.app/Contents/MacOS/gopher64 install_name_tool -change /opt/homebrew/opt/libpng/lib/libpng16.16.dylib \ @executable_path/../Frameworks/libpng16.16.dylib target/${{ matrix.target }}/release/bundle/osx/Gopher64.app/Contents/Frameworks/libfreetype.6.dylib - codesign -f --entitlements data/entitlements.plist --deep --timestamp --options runtime -s - target/${{ matrix.target }}/release/bundle/osx/Gopher64.app env: NETPLAY_ID: ${{ secrets.NETPLAY_ID }} MACOSX_DEPLOYMENT_TARGET: "26.0" + - name: Sign Bundle Dev + if: ${{ github.ref_type != 'tag' }} + run: | + codesign -f --entitlements data/entitlements_dev.plist --deep --timestamp --options runtime -s - target/${{ matrix.target }}/release/bundle/osx/Gopher64.app + - name: Import Codesign Certs + if: ${{ github.ref_type == 'tag' }} + uses: apple-actions/import-codesign-certs@v6 + with: + p12-file-base64: ${{ secrets.APPLE_CERTIFICATES_FILE_BASE64 }} + p12-password: ${{ secrets.APPLE_CERTIFICATES_PASSWORD }} + - name: Sign Bundle Release + if: ${{ github.ref_type == 'tag' }} + run: | + codesign -f --entitlements data/entitlements_prod.plist --deep --timestamp --options runtime -s "${{ secrets.APPLE_DEVELOPER_ID }}" target/${{ matrix.target }}/release/bundle/osx/Gopher64.app + zip -r gopher64-${{ matrix.arch }}.zip target/${{ matrix.target }}/release/bundle/osx/Gopher64.app + xcrun notarytool submit --wait --apple-id "${{ secrets.APPLE_ID }}" --team-id "${{ secrets.APPLE_DEVELOPER_ID }}" --password "${{ secrets.APPLE_APP_PASSWORD }}" gopher64-${{ matrix.arch }}.zip + xcrun stapler staple target/${{ matrix.target }}/release/bundle/osx/Gopher64.app - name: Upload file uses: actions/upload-artifact@v7 with: diff --git a/Cargo.toml b/Cargo.toml index 3a1fa3c..78e0860 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,3 +58,4 @@ identifier = "io.github.gopher64.gopher64" category = "public.app-category.games" icon = ["data/icon/gopher64_128x128.png","data/icon/gopher64_256x256.png","data/icon/gopher64_512x512.png"] osx_frameworks = ["/opt/homebrew/opt/molten-vk/lib/libMoltenVK.dylib","/opt/homebrew/opt/freetype/lib/libfreetype.6.dylib","/opt/homebrew/opt/libpng/lib/libpng16.16.dylib"] +osx_minimum_system_version = "26.0" diff --git a/data/entitlements.plist b/data/entitlements_dev.plist similarity index 100% rename from data/entitlements.plist rename to data/entitlements_dev.plist diff --git a/data/entitlements_prod.plist b/data/entitlements_prod.plist new file mode 100644 index 0000000..45b3615 --- /dev/null +++ b/data/entitlements_prod.plist @@ -0,0 +1,18 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + com.apple.security.network.server + + com.apple.security.device.usb + + com.apple.security.device.bluetooth + + com.apple.security.files.user-selected.read-only + + +