-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (78 loc) · 2.45 KB
/
release.yml
File metadata and controls
93 lines (78 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
electron-builder-args: --mac
artifact-name: release-macos
- os: windows-latest
electron-builder-args: --win
artifact-name: release-windows
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Package with electron-builder
run: npx electron-builder ${{ matrix.electron-builder-args }} --publish never
env:
# Skip code signing in CI (unsigned builds)
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact-name }}
path: |
release/*.exe
release/*.dmg
release/*.blockmap
release/*.yml
if-no-files-found: error
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Download macOS artifacts
uses: actions/download-artifact@v8
with:
name: release-macos
path: artifacts
- name: Download Windows artifacts
uses: actions/download-artifact@v8
with:
name: release-windows
path: artifacts
- name: Check for release notes
id: release_notes
run: |
if [ -f RELEASE_NOTES.md ]; then
echo "has_notes=true" >> "$GITHUB_OUTPUT"
else
echo "has_notes=false" >> "$GITHUB_OUTPUT"
fi
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
prerelease: false # All releases are beta — don't mark pre-release until stable versions exist
make_latest: true # Always mark as Latest — beta-only project needs a visible "Latest" on the repo page
body_path: ${{ steps.release_notes.outputs.has_notes == 'true' && 'RELEASE_NOTES.md' || '' }}
generate_release_notes: ${{ steps.release_notes.outputs.has_notes != 'true' }}