generated from sindresorhus/electron-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b5223c
commit ac5a8cc
Showing
2 changed files
with
70 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,53 @@ | ||
name: Build | ||
name: Build and Release | ||
|
||
on: [push, workflow_dispatch] | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' # Trigger on version tags like v1.0.0 | ||
|
||
jobs: | ||
build_desktop: | ||
name: Build Desktop on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
os: [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm i | ||
- name: Build | ||
uses: samuelmeuli/[email protected] | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
skip_build: true | ||
## - name: Get current version | ||
## uses: Saionaro/[email protected] | ||
## id: package-version | ||
## - name: Upload Artifact | ||
## uses: actions/upload-artifact@v2 | ||
## if: matrix.os == 'ubuntu-latest' | ||
## with: | ||
## name: 'PresentationBridgeClient-${{ steps.package-version.outputs.version }}-Linux' | ||
## path: 'release/PresentationBridgeClient-${{ steps.package-version.outputs.version }}.AppImage' | ||
## - name: Upload Artifact | ||
## uses: actions/upload-artifact@v2 | ||
## if: matrix.os == 'macos-latest' | ||
## with: | ||
## name: 'PresentationBridgeClient-${{ steps.package-version.outputs.version }}-MacOS' | ||
## path: 'release/PresentationBridgeClient-${{ steps.package-version.outputs.version }}.dmg' | ||
## - name: Upload Artifact | ||
## uses: actions/upload-artifact@v2 | ||
## if: matrix.os == 'windows-latest' | ||
## with: | ||
## name: 'PresentationBridgeClient-${{ steps.package-version.outputs.version }}-Windows' | ||
## path: 'release/PresentationBridgeClient Setup ${{ steps.package-version.outputs.version }}.exe' | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: yarn install --production | ||
|
||
# macOS-specific steps for code signing and notarization | ||
- name: Import Apple Developer Certificate (macOS only) | ||
if: matrix.os == 'macos-latest' | ||
env: | ||
DEVELOPER_ID_CERT: ${{ secrets.DEVELOPER_ID_CERT }} | ||
DEVELOPER_ID_CERT_PASSWORD: ${{ secrets.DEVELOPER_ID_CERT_PASSWORD }} | ||
run: | | ||
echo "$DEVELOPER_ID_CERT" | base64 --decode > developer_id_certificate.p12 | ||
security create-keychain -p "" build.keychain | ||
security default-keychain -s build.keychain | ||
security unlock-keychain -p "" build.keychain | ||
security import developer_id_certificate.p12 -k build.keychain -P "$DEVELOPER_ID_CERT_PASSWORD" -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "" build.keychain | ||
- name: List Certificates in Keychain (macOS only) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
security find-identity -v -p codesigning | ||
- name: Build and Release | ||
uses: samuelmeuli/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
release: true | ||
env: | ||
DEBUG: electron-notarize* | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | ||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?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-dyld-environment-variables</key> | ||
<true/> | ||
<key>com.apple.security.cs.disable-library-validation</key> | ||
<true/> | ||
<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.debugger</key> | ||
<true/> | ||
<key>com.apple.security.network.client</key> | ||
<true/> | ||
<key>com.apple.security.network.server</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-only</key> | ||
<true/> | ||
<key>com.apple.security.inherit</key> | ||
<true/> | ||
<key>com.apple.security.automation.apple-events</key> | ||
<true/> | ||
</dict> | ||
</plist> |