Skip to content

Commit 3e39c87

Browse files
mikolalysenkoclaude
andcommitted
Add GitHub Actions workflow for npm publishing with provenance
Sets up automated publishing workflow using Socket Registry provenance system for secure package releases with attestations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent b99e3eb commit 3e39c87

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 📦 Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dist-tag:
7+
description: 'npm dist-tag (latest, next, beta, canary, backport, etc.)'
8+
required: false
9+
default: 'latest'
10+
type: string
11+
debug:
12+
description: 'Enable debug output'
13+
required: false
14+
default: '0'
15+
type: string
16+
options:
17+
- '0'
18+
- '1'
19+
20+
permissions:
21+
contents: write
22+
id-token: write
23+
24+
jobs:
25+
publish:
26+
uses: SocketDev/socket-registry/.github/workflows/provenance.yml@63ad52562c1f2d007a1833b2b22cffc3001e1cc2 # main
27+
with:
28+
debug: ${{ inputs.debug }}
29+
dist-tag: ${{ inputs.dist-tag }}
30+
package-name: '@socketsecurity/socket-patch'
31+
publish-script: 'publish:ci'
32+
setup-script: 'pnpm run build'
33+
use-trusted-publishing: true

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@
5050
"patch": "node dist/cli.js",
5151
"lint": "oxlint -c ./.oxlintrc.json --tsconfig ./tsconfig.json --deny-warnings",
5252
"lint:fix": "pnpm run lint --fix && pnpm run lint:fix:fast",
53-
"lint:fix:fast": "biome format --write"
53+
"lint:fix:fast": "biome format --write",
54+
"publish:ci": "npm publish --provenance --access public"
55+
},
56+
"publishConfig": {
57+
"access": "public",
58+
"registry": "https://registry.npmjs.org/"
5459
},
5560
"keywords": [
5661
"security",

0 commit comments

Comments
 (0)