update release instructions #2
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 Installer and Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' # run workflow with any tag that starts with 'v' | ||
jobs: | ||
build: | ||
name: Build on node ${{ matrix.node_version }} and ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node_version: [16.x] | ||
os: [windows-latest] # or [windows-latest, macos-latest, ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
- name: Build Electron app | ||
uses: samuelmeuli/action-electron-builder@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
- name: list all files | ||
run: find dist | ||
- name: Upload installer | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: installer | ||
path: dist/win/*.exe | ||
sign-installer: | ||
name: Sign installer | ||
needs: build | ||
uses: sillsdev/codesign/.github/workflows/sign.yml@v2 | ||
with: | ||
artifact: installer | ||
secrets: | ||
certificate: ${{ secrets.CODESIGN_LSDEVSECTIGOEV }} | ||
create-release: | ||
name: Create Release | ||
needs: sign-installer | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: installer | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: *.exe | ||
body: | | ||
Release for version ${{ github.ref }} | ||
draft: true |