Merge pull request #12 from forketyfork/cursor-enhancements #20
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-macos: | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: arm64 | |
| runner: macos-latest | |
| - arch: x86_64 | |
| runner: macos-15-intel | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: architect | |
| - name: Checkout ghostty dependency | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: ghostty-org/ghostty | |
| path: architect/ghostty | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - name: Import code-signing certificate | |
| env: | |
| MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | |
| MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
| if: ${{ env.MACOS_CERTIFICATE != '' && env.MACOS_CERTIFICATE_PWD != '' }} | |
| uses: Apple-Actions/import-codesign-certs@v6 | |
| with: | |
| p12-file-base64: ${{ env.MACOS_CERTIFICATE }} | |
| p12-password: ${{ env.MACOS_CERTIFICATE_PWD }} | |
| - name: Cache Nix store | |
| uses: cachix/cachix-action@v16 | |
| with: | |
| name: forketyfork | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - name: Build release | |
| run: nix develop --command zig build -Doptimize=ReleaseFast | |
| working-directory: architect | |
| - name: Bundle libraries and package | |
| run: | | |
| chmod +x scripts/bundle-macos.sh | |
| ./scripts/bundle-macos.sh zig-out/bin/architect release | |
| if security find-identity -v -p codesigning >/tmp/codesign-identities.txt 2>/dev/null; then | |
| IDENTITY=$(awk 'NR==1 {print $2}' /tmp/codesign-identities.txt) | |
| echo "Signing with identity ${IDENTITY}" | |
| for lib in release/lib/*.dylib; do | |
| codesign --force --options runtime --timestamp --sign "$IDENTITY" "$lib" | |
| done | |
| codesign --force --options runtime --timestamp --sign "$IDENTITY" release/architect.bin | |
| else | |
| echo "No Developer ID cert available; applying ad-hoc signature for Gatekeeper" | |
| for lib in release/lib/*.dylib; do | |
| codesign --force --sign - "$lib" | |
| done | |
| codesign --force --sign - release/architect.bin | |
| fi | |
| cd release | |
| tar -czf architect-macos-${{ matrix.arch }}.tar.gz * | |
| working-directory: architect | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: architect-macos-${{ matrix.arch }} | |
| path: architect/release/architect-macos-${{ matrix.arch }}.tar.gz | |
| - name: Create Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: architect/release/architect-macos-${{ matrix.arch }}.tar.gz | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |