-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.31 KB
/
publish.yml
File metadata and controls
39 lines (36 loc) · 1.31 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
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 stage:release
- run: pnpm verify:release
- run: npm pack --json packages/x402-proxy/.release/x402-proxy > /dev/null
- run: npm pack --json packages/x402-proxy/.release/x402-proxy-openclaw > /dev/null
- run: npm publish --provenance --access public packages/x402-proxy/.release/x402-proxy
- run: npm publish --provenance --access public packages/x402-proxy/.release/x402-proxy-openclaw
- 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"