-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1001 Bytes
/
publish.yml
File metadata and controls
34 lines (31 loc) · 1001 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
name: Publish to npm
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm check
- run: pnpm build
- run: pnpm --filter x402-proxy test
- run: pnpm --filter x402-proxy publish --provenance --access public --no-git-checks
- name: Extract changelog and create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
NOTES=$(awk "/^## \\[${VERSION}\\]/{found=1; next} /^## \\[/{if(found) exit} found{print}" packages/x402-proxy/CHANGELOG.md)
gh release create "$GITHUB_REF_NAME" --title "$GITHUB_REF_NAME" --notes "$NOTES"