-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (71 loc) · 2.01 KB
/
Copy pathrelease.yml
File metadata and controls
75 lines (71 loc) · 2.01 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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build · ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS
os: macos-latest
artifact: macos
- name: Windows
os: windows-latest
artifact: windows
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint and test
run: npm run check
- name: Build macOS Apple Silicon
if: runner.os == 'macOS'
run: npm run dist -- --mac --arm64 --publish never
- name: Build macOS Intel
if: runner.os == 'macOS'
run: npm run dist -- --mac --x64 --publish never
- name: Build Windows x64
if: runner.os == 'Windows'
run: npm run dist -- --win --x64 --publish never
- name: Upload packages
uses: actions/upload-artifact@v7
with:
name: release-${{ matrix.artifact }}
path: |
release/*.dmg
release/*.zip
release/*.exe
if-no-files-found: error
retention-days: 7
publish:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout release notes
uses: actions/checkout@v7
- name: Download packages
uses: actions/download-artifact@v8
with:
path: artifacts
merge-multiple: true
- name: Generate checksums
working-directory: artifacts
run: sha256sum -- * > SHA256SUMS.txt
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" artifacts/* --repo "$GITHUB_REPOSITORY" --verify-tag --title "JLaunch $GITHUB_REF_NAME" --notes-file RELEASE_NOTES.md