some macos fixes hopefully #57
This file contains hidden or 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
| name: Build apps | |
| on: | |
| push: | |
| jobs: | |
| build-macos: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13.5" | |
| cache: "pip" | |
| - run: pip install -r ./requirements.txt | |
| - name: Build for MacOS | |
| run: pyinstaller main.spec | |
| - name: Import Developer-ID cert | |
| env: | |
| CERT_B64: ${{ secrets.MAC_CERT_P12_BASE64 }} | |
| CERT_PASS: ${{ secrets.MAC_CERT_PASSWORD }} | |
| run: | | |
| echo "$CERT_B64" | base64 --decode > /tmp/cert.p12 | |
| security create-keychain -p "" build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "" build.keychain | |
| security import /tmp/cert.p12 -k build.keychain -P "$CERT_PASS" -T /usr/bin/codesign | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain | |
| - name: Codesign app | |
| env: | |
| SIGN_ID: ${{ secrets.CODE_SIGN_IDENTITY }} | |
| run: | | |
| codesign --force --deep --options runtime \ | |
| --entitlements entitlements.plist \ | |
| --timestamp \ | |
| --sign "$SIGN_ID" \ | |
| "dist/Wonky Window.app" | |
| - name: Notarise & staple | |
| env: | |
| AC_USERNAME: ${{ secrets.AC_USERNAME }} | |
| AC_PASSWORD: ${{ secrets.AC_PASSWORD }} | |
| AC_TEAMID: ${{ secrets.AC_TEAMID }} | |
| run: | | |
| ditto -c -k --keepParent "dist/Wonky Window.app" "WonkyWindow.zip" | |
| xcrun notarytool submit WonkyWindow.zip \ | |
| --apple-id "$AC_USERNAME" \ | |
| --team-id "$AC_TEAMID" \ | |
| --password "$AC_PASSWORD" \ | |
| --wait | |
| xcrun stapler staple "dist/Wonky Window.app" | |
| - name: Create dmg file | |
| run: | | |
| hdiutil detach "/Volumes/Wonky Window" || true | |
| mkdir -p "dist/dmg_staging" | |
| cp -R "dist/Wonky Window.app" "dist/dmg_staging/" | |
| ln -s /Applications "dist/dmg_staging/Applications" | |
| hdiutil create -volname "Wonky Window" -srcfolder "dist/dmg_staging" -ov -format UDZO "dist/Wonky Window.dmg" | |
| - name: Upload MacOS Artifact (DMG) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WonkyWindow-macos | |
| path: dist/Wonky Window.dmg | |
| - name: Upload MacOS Artifact (.app file) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WonkyWindow-macos-unsigned | |
| path: dist/Wonky Window* | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| cache: "pip" | |
| - run: pip install -r ./requirements.txt | |
| - name: Build for Windows | |
| run: pyinstaller main.spec | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WonkyWindow-windows | |
| path: dist/Wonky Window* | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| cache: "pip" | |
| - run: pip install -r ./requirements.txt | |
| - name: Build for Linux (untested) | |
| run: pyinstaller main.spec | |
| - name: Upload Linux Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: WonkyWindow-linux | |
| path: dist/Wonky Window* |