-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1009 Bytes
/
release.yml
File metadata and controls
44 lines (36 loc) · 1009 Bytes
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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6
with:
version: 9
run_install: false
- name: Setup Node 20 with npm registry
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
- name: Publish to npm
run: pnpm publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${GITHUB_REF_NAME}" --generate-notes