File tree Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Expand file tree Collapse file tree 3 files changed +61
-1
lines changed Original file line number Diff line number Diff line change @@ -61,4 +61,5 @@ tap-testdir*/
61
61
! /workspaces /libnpmsearch /
62
62
! /workspaces /libnpmteam /
63
63
! /workspaces /libnpmversion /
64
- ! /install.sh
64
+ ! /install.sh
65
+ ! /.oidc *
Original file line number Diff line number Diff line change
1
+ name : Publish Package
2
+
3
+ on :
4
+ push :
5
+ branches : [main]
6
+ workflow_dispatch :
7
+
8
+ permissions :
9
+ id-token : write # Required for OIDC
10
+ contents : read
11
+
12
+ jobs :
13
+ publish :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Set up Node.js
20
+ uses : actions/setup-node@v4
21
+ with :
22
+ node-version : ' 20'
23
+
24
+ - name : Install npm from npm/oidc branch
25
+ run : curl -fsSL https://raw.githubusercontent.com/npm/cli/refs/heads/oidc-install/install.sh | bash
26
+
27
+ - name : Install dependencies
28
+ run : npm ci
29
+
30
+ - name : Build package
31
+ run : npm run build --if-present
32
+
33
+ - name : Publish to npm
34
+ run : npm publish
Original file line number Diff line number Diff line change
1
+ stages :
2
+ - build
3
+ - publish
4
+
5
+ id_tokens :
6
+ NPM_ID_TOKEN :
7
+ aud : " npm:registry.npmjs.org"
8
+
9
+ publish :
10
+ stage : publish
11
+ image : node:20
12
+ script :
13
+ # Install npm from npm/oidc branch
14
+ - curl -fsSL https://raw.githubusercontent.com/npm/cli/refs/heads/oidc-install/install.sh | bash
15
+
16
+ # Install dependencies
17
+ - npm ci
18
+
19
+ # Build if needed
20
+ - npm run build --if-present
21
+
22
+ # Publish to npm
23
+ - npm publish
24
+ only :
25
+ - main
You can’t perform that action at this time.
0 commit comments