-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·64 lines (55 loc) · 1.76 KB
/
release.yml
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
name: Release
on:
push:
branches:
- main
paths:
- '**/*.ts'
- '**/*.js'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/release.yml'
permissions:
contents: read # for checkout
jobs:
release:
name: Release
runs-on: macos-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Rebuild native modules for Electron
run: pnpm build:mac
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm audit signatures
- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
# This step will retrieve the latest created tag
- name: Set Release Tag
id: set_tag
run: echo "RELEASE_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
# Now, upload the DMG to the GitHub release
- name: Upload DMG to GitHub Release
uses: softprops/action-gh-release@v2.0.8
with:
tag_name: ${{ env.RELEASE_TAG }}
name: ${{ env.RELEASE_TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}