-
-
Notifications
You must be signed in to change notification settings - Fork 41
50 lines (41 loc) · 1.12 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (41 loc) · 1.12 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
name: release
permissions:
contents: write
id-token: write
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"
registry-url: 'https://registry.npmjs.org'
- name: Create GitHub release notes
run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish release
# Prerelease versions (e.g. 3.0.0-beta.1) go to the beta dist-tag so
# they never override latest
run: |
if node -e "process.exit(require('./package.json').version.includes('-') ? 0 : 1)"; then
pnpm publish --no-git-checks --tag beta
else
pnpm publish --no-git-checks
fi