-
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (41 loc) · 1.18 KB
/
release.yaml
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
name: Release
on:
push:
tags:
- v*
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Release
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: '20'
- name: Setup pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Check dist updated
run: |
pnpm build
git diff --quiet -- dist || {
echo "::error::The ./dist is outdated, run 'pnpm build' and commit"
exit 1
}
- uses: ncipollo/[email protected]
id: release
with:
draft: ${{ contains(github.ref, '-draft') }}
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-alpha') || contains(github.ref, '-beta') }}
generateReleaseNotes: true
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Workflow notices
run: echo "::notice title=Release::${{ steps.release.outputs.html_url }}"