Merge pull request #320 from PatUMW/patch-1 #75
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/Release | |
on: [push] | |
jobs: | |
MacOS: | |
runs-on: macos-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@master | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@master | |
with: | |
node-version: 16 | |
- name: Prepare for private keys | |
run: | | |
mkdir -p ~/private_keys/ | |
- name: Prepare for app notarization | |
# Import Apple API key for app notarization on macOS | |
run: | | |
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 | |
- name: Install Dependencies | |
run: yarn | |
- name: Build Electron app | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: yarn build | |
env: | |
# macOS Signing | |
CSC_LINK: ${{ secrets.mac_certs }} | |
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }} | |
# macOS notarization API key | |
APPLE_ID: ${{ secrets.apple_id }} | |
APPLE_ID_PASSWORD: ${{ secrets.apple_id_password }} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.apple_id_password }} | |
APPLE_TEAM_ID: ${{ secrets.apple_team_id }} | |
ARCH: universal | |
- name: Release Electron app | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
run: yarn release | |
env: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
GH_TOKEN: ${{ secrets.github_token }} | |
# macOS Signing | |
CSC_LINK: ${{ secrets.mac_certs }} | |
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }} | |
# macOS notarization API key | |
APPLE_ID: ${{ secrets.apple_id }} | |
APPLE_ID_PASSWORD: ${{ secrets.apple_id_password }} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.apple_id_password }} | |
APPLE_TEAM_ID: ${{ secrets.apple_team_id }} | |
ARCH: universal | |
- name: .dmg artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dmg file | |
path: | | |
dist/*.dmg | |
Windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@master | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@master | |
with: | |
node-version: 16 | |
- name: Prepare for private keys | |
run: | | |
mkdir -p ~/private_keys/ | |
- name: Prepare for Windows signing | |
# Import Signing key for app signing on Windows | |
run: | | |
echo "$windows_certs" | base64 -d > ~/private_keys/Windows_Certificate.pfx | |
shell: bash | |
env: | |
windows_certs: ${{ secrets.windows_certs }} | |
- name: Install Dependencies | |
run: yarn | |
- name: Build Electron app | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: yarn build | |
env: | |
CSC_LINK: ~/private_keys/Windows_Certificate.pfx | |
CSC_KEY_PASSWORD: ${{ secrets.windows_certs_password }} | |
ARCH: x64 | |
- name: Release Electron app | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
run: yarn release | |
env: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
GH_TOKEN: ${{ secrets.github_token }} | |
CSC_LINK: ~/private_keys/Windows_Certificate.pfx | |
CSC_KEY_PASSWORD: ${{ secrets.windows_certs_password }} | |
ARCH: x64 | |
- name: .exe artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: exe file | |
path: | | |
dist/*.exe | |
- name: .msi artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: msi file | |
path: | | |
dist/*.msi | |
Linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@master | |
- name: Install Node.js, NPM and Yarn | |
uses: actions/setup-node@master | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: yarn | |
- name: Build Electron app | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: yarn build | |
env: | |
ARCH: x64 | |
- name: Release Electron app | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
run: yarn release | |
env: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
GH_TOKEN: ${{ secrets.github_token }} | |
ARCH: x64 | |
- name: .deb artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: deb file | |
path: | | |
dist/*.deb | |
- name: .rpm artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpm file | |
path: | | |
dist/*.rpm | |
- name: .AppImage artifacts | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: AppImage file | |
path: | | |
dist/*.AppImage |