Skip to content

Commit 0e5e225

Browse files
committed
github workflow to publish package on npm
1 parent ac62d99 commit 0e5e225

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/provenance.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish Packages to npm
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
debug:
7+
description: 'Enable debug output'
8+
required: false
9+
default: '0'
10+
type: string
11+
options:
12+
- '0'
13+
- '1'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: read
21+
id-token: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: '22'
28+
registry-url: 'https://registry.npmjs.org'
29+
cache: npm
30+
scope: '@socketregistry'
31+
- run: npm install -g npm@latest
32+
- run: npm ci
33+
- run: npm publish --provenance --access public
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
SOCKET_CLI_DEBUG: ${{ inputs.debug }}

0 commit comments

Comments
 (0)