-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (115 loc) · 4.99 KB
/
Copy pathrelease.yml
File metadata and controls
133 lines (115 loc) · 4.99 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Release
on:
release:
types: [published]
permissions:
contents: read
id-token: write
jobs:
publish:
name: Publish txKit packages
runs-on: ubuntu-latest
if: startsWith(github.event.release.tag_name, 'v')
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
registry-url: https://registry.npmjs.org
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
# NOTE: --provenance is intentionally disabled until the source
# repository becomes public (npm provenance rejects private GitHub
# source repos). Re-add --provenance with the public-repo migration.
# Publish order respects dependency graph: core has no internal
# deps, themes is css-only, tx-protocol has no @txkit deps, react
# depends on @txkit/core.
#
# Each step is idempotent (publish-if-new): a cohort release only
# ships packages whose package.json version is not yet on the npm
# registry. Lets a tag like v0.1.0-alpha.N add a single new package
# without forcing a synchronized cohort bump for the others.
- name: Publish @txkit/core
run: |
VERSION=$(node -p "require('./packages/core/package.json').version")
if npm view "@txkit/core@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/core@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/core publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/themes
run: |
VERSION=$(node -p "require('./packages/themes/package.json').version")
if npm view "@txkit/themes@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/themes@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/themes publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/tx-protocol
run: |
VERSION=$(node -p "require('./packages/tx-protocol/package.json').version")
if npm view "@txkit/tx-protocol@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/tx-protocol@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/tx-protocol publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/tx-decoder
run: |
VERSION=$(node -p "require('./packages/tx-decoder/package.json').version")
if npm view "@txkit/tx-decoder@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/tx-decoder@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/tx-decoder publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/ows-adapter
run: |
VERSION=$(node -p "require('./packages/ows-adapter/package.json').version")
if npm view "@txkit/ows-adapter@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/ows-adapter@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/ows-adapter publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/x402-adapter
run: |
VERSION=$(node -p "require('./packages/x402-adapter/package.json').version")
if npm view "@txkit/x402-adapter@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/x402-adapter@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/x402-adapter publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/arbitrum-adapter
run: |
VERSION=$(node -p "require('./packages/arbitrum-adapter/package.json').version")
if npm view "@txkit/arbitrum-adapter@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/arbitrum-adapter@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/arbitrum-adapter publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @txkit/react
run: |
VERSION=$(node -p "require('./packages/react/package.json').version")
if npm view "@txkit/react@$VERSION" version >/dev/null 2>&1; then
echo "@txkit/react@$VERSION already on npm, skipping"
else
pnpm --filter @txkit/react publish --no-git-checks --access public --tag alpha
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}