Update to @electron/notarize #82
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
name: build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest ] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v1 | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.13.1 | |
- name: Install PNPM | |
uses: pnpm/[email protected] | |
with: | |
version: 6.25.1 | |
- name: Install Packages | |
run: pnpm i --no-frozen-lockfile | |
- name: Prepare for app notarization | |
if: startsWith(matrix.os, 'macos') | |
# Import Apple API key for app notarization on macOS | |
run: | | |
mkdir -p ~/private_keys/ | |
echo '${{ secrets.appstore_api_key_file }}' > ~/private_keys/AuthKey_${{ secrets.appstore_api_key_id }}.p8 | |
- name: Release on mac | |
if: startsWith(matrix.os, 'macos') | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
# macOS notarization API key | |
APPLE_ID: ${{ secrets.apple_id }} | |
APPLE_ID_PASSWORD: ${{ secrets.apple_id_app_specific_pwd }} | |
APPLEIDPASS: ${{ secrets.apple_id_app_specific_pwd }} | |
uses: samuelmeuli/action-electron-builder@v1 | |
with: | |
github_token: ${{ github.token }} | |
mac_certs: ${{ secrets.macos_codesign_cert }} | |
mac_certs_password: ${{ secrets.macos_codesign_cert_password }} | |
- name: Release on PC | |
if: startsWith(matrix.os, 'windows') | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: | | |
pnpm run release-win | |
- name: Slack notification on Success | |
if: ${{ success() }} | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: custom | |
custom_payload: | | |
{ | |
text: "Studio has been built successfully for ${{ matrix.os }}.", | |
attachments: [{ | |
fallback: 'fallback', | |
color: 'good', | |
title: 'New build' | |
}] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | |
- name: Slack notification on Failure | |
if: ${{ failure() }} | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: custom | |
custom_payload: | | |
{ | |
text: "Studio build has failed for ${{ matrix.os }}.", | |
attachments: [{ | |
fallback: 'fallback', | |
color: 'bad', | |
title: 'Release Failure' | |
}] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |