Skip to content

Commit

Permalink
Optimize GitHub Actions workflow for building and releasing the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Aug 17, 2024
1 parent 573d34b commit 609bd75
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@ on:
- 'v*.*.*'

jobs:
release:
runs-on: ${{ matrix.os }}

build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v2

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
node-version: '18'

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.GH_TOKEN }}
- name: Install dependencies
run: npm install

# 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') }}
- name: Publish to GitHub Releases
run: npm run publish -- --prerelease
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit 609bd75

Please sign in to comment.