This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
2.2.0 #151
Workflow file for this run
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: Sign and Release | |
on: | |
push: | |
tags: ['v[0-9]+.[0-9]+.[0-9]+*'] | |
jobs: | |
sign_and_release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js and NPM | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Prepare for app notarization | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
mkdir -p ~/private_keys/ | |
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 | |
echo '${{ secrets.mac_certs }}' | base64 -d > applecert.p12 | |
- id: get-args | |
run: | | |
args=$(if ${{ startsWith(matrix.os, 'macos') }}; then echo '--mac --universal'; else echo ''; fi) | |
args=$(if ${{ startsWith(matrix.os, 'windows') }}; then echo '-w'; else echo $args; fi) | |
args=$(if ${{ startsWith(matrix.os, 'ubuntu') }}; then echo '-l'; else echo $args; fi) | |
echo "args=$args" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Install Snapcraft | |
uses: samuelmeuli/action-snapcraft@v1 | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
args: ${{ steps.get-args.outputs.args }} | |
github_token: ${{ secrets.github_token }} | |
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
mac_certs: ${{ secrets.mac_certs }} | |
mac_certs_password: ${{ secrets.mac_certs_password }} | |
windows_certs: ${{ secrets.windows_certs }} | |
windows_certs_password: ${{ secrets.windows_certs_password }} | |
env: | |
APPLE_ID: ${{ secrets.apple_id }} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.apple_app_specific_password }} | |
APPLE_ID_PASSWORD: ${{ secrets.apple_id_password }} | |
APPLEID: ${{ secrets.apple_id }} | |
APPLEIDPASS: ${{ secrets.apple_id_password }} | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} |