v1.21.0 #13
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: Build and release Electron app | |
on: | |
release: | |
types: [released] | |
jobs: | |
build-and-release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
permissions: | |
contents: write | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v1 | |
- name: Setup Node.js and NPM | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.9.1 | |
- name: Get version from tag | |
id: get_version | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const tag = context.ref | |
const version = tag.replace('refs/tags/v', '') | |
core.setOutput('version', version) | |
- name: Set version | |
run: cd electron && npm version ${{ steps.get_version.outputs.version }} --no-git-tag-version && cd .. | |
- name: Run electron-builder | |
uses: samuelmeuli/action-electron-builder@e4b12cd06ddf023422f1ac4e39632bd76f6e6928 | |
with: | |
package_root: electron | |
github_token: ${{ secrets.github_token }} | |
- name: Upload binaries to release | |
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
files: | | |
electron/out/*.dmg* | |
electron/out/*.AppImage* | |
electron/out/*.exe* | |
electron/out/latest*.yml |