-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.13 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*
permissions:
contents: write
id-token: write
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install packages
run: pnpm i
- name: Generate release notes
uses: actions/github-script@v7
with:
script: |
const tag = context.ref.split('/').at(-1);
github.rest.repos.createRelease({
name: `Release ${tag}`,
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: tag,
generate_release_notes: true
})
- name: Publish to NPM
run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to JSR
run: npx jsr publish