Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 40 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,53 @@ jobs:
- name: Generate Paraglide output
run: npx paraglide-js compile --project ./project.inlang --outdir ./src/renderer/src/paraglide

- name: Setup macOS code signing
if: matrix.platform == 'macos'
shell: bash
env:
APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD || github.run_id }}
run: |
# Create temporary keychain
KEYCHAIN_PATH=$RUNNER_TEMP/build.keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"

# Import certificate
CERTIFICATE_PATH=$RUNNER_TEMP/certificate.p12
echo "$APPLE_CERTIFICATE_BASE64" | base64 --decode > "$CERTIFICATE_PATH"
security import "$CERTIFICATE_PATH" -k "$KEYCHAIN_PATH" -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"

# Set as default keychain
security list-keychain -d user -s "$KEYCHAIN_PATH"

# Clean up certificate file
rm "$CERTIFICATE_PATH"

- name: Build
run: npm run build

- name: Package
run: npx electron-builder ${{ matrix.dist-flag }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_TEAM_ID: ${{ matrix.platform == 'macos' && secrets.APPLE_TEAM_ID || '' }}
APPLE_ID: ${{ matrix.platform == 'macos' && secrets.APPLE_ID || '' }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ matrix.platform == 'macos' && secrets.APPLE_APP_SPECIFIC_PASSWORD || '' }}

- name: Cleanup macOS keychain
if: matrix.platform == 'macos' && always()
shell: bash
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD || github.run_id }}
run: |
KEYCHAIN_PATH=$RUNNER_TEMP/build.keychain
if [ -f "$KEYCHAIN_PATH" ]; then
security delete-keychain "$KEYCHAIN_PATH"
fi

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -176,7 +216,3 @@ jobs:
### Prerequisites

[birda](https://github.com/tphakala/birda) CLI must be installed and available on your PATH.

### macOS Users

This app is not yet code-signed. After downloading, right-click the app and select **Open** to bypass Gatekeeper.
12 changes: 12 additions & 0 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@
"target": [
"dmg"
],
"category": "public.app-category.utilities"
"category": "public.app-category.utilities",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The entitlementsInherit property is redundant here. According to the electron-builder documentation, entitlementsInherit defaults to the value of entitlements if not specified. Since you are setting it to the same value, you can remove this line to simplify the configuration.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not redundant - these serve different purposes:

  • entitlements: Applied to the main app binary
  • entitlementsInherit: Applied to child processes, frameworks, and bundles

Using the same file for both is intentional (we want consistent permissions across all processes). The default is build/entitlements.mac.inherit.plist, not the value of entitlements (electron-builder docs).

"notarize": true
},
"nsis": {
"oneClick": false,
Expand Down
Loading