-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,32 @@ | ||
name: Build | ||
name: Build/release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
paths-ignore: | ||
- '**.md' | ||
- '**.spec.js' | ||
- '.idea' | ||
- '.vscode' | ||
- '.dockerignore' | ||
- 'Dockerfile' | ||
- '.gitignore' | ||
- '.github/**' | ||
- '!.github/workflows/build.yml' | ||
on: push | ||
|
||
jobs: | ||
build: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Check out Git repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Build Release Files | ||
run: npm run build:electron | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
- name: Build/release Electron app | ||
uses: samuelmeuli/action-electron-builder@v1 | ||
with: | ||
name: release_on_${{ matrix. os }} | ||
path: release/ | ||
retention-days: 5 | ||
build_script_name: build:electron | ||
# GitHub token, automatically provided to the action | ||
# (No need to define this secret in the repo settings) | ||
github_token: ${{ secrets.github_token }} | ||
|
||
# If the commit is tagged with a version (e.g. "v1.0.0"), | ||
# release the app after building | ||
release: ${{ startsWith(github.ref, 'refs/tags/v') }} |