Skip to content

Release

Release #20

Workflow file for this run

name: Release
# @see: https://dev.to/erikhofer/build-and-publish-a-multi-platform-electron-app-on-github-3lnd
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to trigger on'
required: true
type: string
jobs:
publish_on_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: install dependencies
run: yarn install
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_API_SERVER_URL: ${{ secrets.VITE_API_SERVER_URL }}
run: yarn run publish
publish_on_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: install dependencies
run: yarn install
# see: https://dev.to/rwwagner90/signing-electron-apps-with-github-actions-4cof
- name: Add MacOS certs
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
- name: Add api key file
run: |
echo "${{ secrets.APPLE_API_KEY_CONTENT }}" > authKey.p8
APPLE_API_KEY=$(realpath authKey.p8)
echo "APPLE_API_KEY=$APPLE_API_KEY" >> $GITHUB_ENV
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_API_SERVER_URL: ${{ secrets.VITE_API_SERVER_URL }}
APPLE_API_KEY: ${{ env.APPLE_API_KEY }}
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
run: DEBUG=* yarn run publish
publish_on_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: install dependencies
run: yarn install
- name: publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VITE_API_SERVER_URL: ${{ secrets.VITE_API_SERVER_URL }}
run: yarn run publish