File tree Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,16 @@ jobs:
66
66
version : pnpm changeset:version
67
67
env :
68
68
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
69
70
70
71
- name : Publish Prerelease
71
72
if : steps.changesets.outputs.published != 'true'
72
73
continue-on-error : true
73
74
env :
75
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
74
76
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75
77
run : |
78
+ npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
76
79
git reset --hard origin/main
77
80
pnpm clean
78
81
pnpm changeset version --no-git-tag --snapshot canary
Original file line number Diff line number Diff line change
1
+ name : Prune NPM tags
2
+ on :
3
+ workflow_dispatch :
4
+ schedule :
5
+ - cron : ' 0 0 * * *'
6
+
7
+ jobs :
8
+ prune :
9
+ name : Prune NPM tags
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Clone repository
13
+ uses : actions/checkout@v4
14
+ with :
15
+ submodules : ' recursive'
16
+
17
+ - name : Setup .npmrc file
18
+ uses : actions/setup-node@v4
19
+ with :
20
+ registry-url : ' https://registry.npmjs.org'
21
+
22
+ - name : Prune tags
23
+ run : cd src && npm view --json | jq -r '.["viem"] | .["dist-tags"] | to_entries | .[] | select(.key != "latest") | select(.key != "canary") | .key' | xargs -I % npm dist-tag rm viem %
24
+ env :
25
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Snapshot
2
+ on :
3
+ workflow_dispatch :
4
+
5
+ jobs :
6
+ canary :
7
+ name : Release snapshot version
8
+ runs-on : ubuntu-latest
9
+ permissions :
10
+ contents : write
11
+ id-token : write
12
+ timeout-minutes : 5
13
+
14
+ steps :
15
+ - name : Clone repository
16
+ uses : actions/checkout@v4
17
+ with :
18
+ submodules : ' recursive'
19
+
20
+ - name : Install dependencies
21
+ uses : ./.github/actions/install-dependencies
22
+
23
+ - name : Publish Snapshots
24
+ continue-on-error : true
25
+ env :
26
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
27
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
+ run : |
29
+ snapshot=$(git branch --show-current | tr -cs '[:alnum:]-' '-' | tr '[:upper:]' '[:lower:]' | sed 's/-$//')
30
+ npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
31
+ pnpm clean
32
+ pnpm changeset version --no-git-tag --snapshot $snapshot
33
+ pnpm changeset:prepublish
34
+ pnpm changeset publish --no-git-tag --snapshot $snapshot --tag $snapshot
35
+
You can’t perform that action at this time.
0 commit comments