Skip to content

ci: update publish

ci: update publish #16

Workflow file for this run

name: Publish
on:
push:
branches:
- main
jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- name: Checkout git repo
uses: actions/checkout@v4
- name: Install Node and NPM
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install and build
run: |
npm install
npm run postinstall
npm run build
- name: Publish releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Only build for the current OS
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
npm exec electron-builder -- --publish always --win
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
npm exec electron-builder -- --publish always --linux
fi