File tree Expand file tree Collapse file tree 1 file changed +41
-2
lines changed Expand file tree Collapse file tree 1 file changed +41
-2
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
+ workflow_dispatch :
7
8
8
9
permissions : {}
9
10
10
11
jobs :
11
12
release :
12
- name : Publish
13
+ name : Publish latest
14
+ if : github.event_name == 'push'
13
15
permissions :
14
16
id-token : write
15
17
runs-on : ubuntu-latest
@@ -32,11 +34,48 @@ jobs:
32
34
- name : Install dependencies
33
35
run : pnpm install --frozen-lockfile
34
36
37
+ - name : Install latest npm
38
+ run : npm install -g npm@latest
39
+
35
40
- name : Publish to npm
36
41
uses : changesets/action@v1
37
42
with :
38
43
publish : pnpm run release
39
44
version : pnpm run stage
40
45
env :
41
46
GITHUB_TOKEN : ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
42
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
47
+
48
+ snapshot :
49
+ name : Publish Snapshot
50
+ if : github.event_name == 'workflow_dispatch'
51
+ permissions :
52
+ id-token : write
53
+ runs-on : ubuntu-latest
54
+ steps :
55
+ - name : Check out repo
56
+ uses : actions/checkout@v5
57
+ with :
58
+ fetch-depth : 0
59
+ token : ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
60
+
61
+ - name : Set up Node.js
62
+ uses : actions/setup-node@v5
63
+ with :
64
+ node-version : 22.x
65
+ package-manager-cache : false
66
+
67
+ - name : Set up pnpm
68
+ run : corepack enable pnpm
69
+
70
+ - name : Install dependencies
71
+ run : pnpm install --frozen-lockfile
72
+
73
+ - name : Install latest npm
74
+ run : npm install -g npm@latest
75
+
76
+ - name : Publish to npm
77
+ uses : seek-oss/changesets-snapshot@v0
78
+ with :
79
+ pre-publish : pnpm run build
80
+ env :
81
+ GITHUB_TOKEN : ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments