Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
xie392 committed Jun 2, 2024
1 parent 64d9da6 commit 80e703f
Showing 1 changed file with 17 additions and 33 deletions.
50 changes: 17 additions & 33 deletions .github/workflows/build.yml
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') }}

0 comments on commit 80e703f

Please sign in to comment.