Skip to content

Commit a67f517

Browse files
committed
Add dist-tag support to provenance workflow
1 parent 4d1187e commit a67f517

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/provenance.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Publish to npm registry
33
on:
44
workflow_dispatch:
55
inputs:
6+
dist-tag:
7+
description: 'npm dist-tag (latest, next, beta, canary, backport, etc.)'
8+
required: false
9+
default: 'latest'
10+
type: string
611
debug:
712
description: 'Enable debug output'
813
required: false
@@ -26,23 +31,23 @@ jobs:
2631
scope: '@socketsecurity'
2732
- run: pnpm install
2833
- run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 pnpm run build:dist
29-
- run: pnpm publish --provenance --access public --no-git-checks
34+
- run: pnpm publish --provenance --access public --no-git-checks --tag ${{ inputs.dist-tag }}
3035
continue-on-error: true
3136
env:
3237
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3338
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
3439
- run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 INLINED_SOCKET_CLI_LEGACY_BUILD=1 pnpm run build:dist
3540
env:
3641
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
37-
- run: pnpm publish --provenance --access public --no-git-checks
42+
- run: pnpm publish --provenance --access public --no-git-checks --tag ${{ inputs.dist-tag }}
3843
continue-on-error: true
3944
env:
4045
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4146
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
4247
- run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 INLINED_SOCKET_CLI_SENTRY_BUILD=1 pnpm run build:dist
4348
env:
4449
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
45-
- run: pnpm publish --provenance --access public --no-git-checks
50+
- run: pnpm publish --provenance --access public --no-git-checks --tag ${{ inputs.dist-tag }}
4651
continue-on-error: true
4752
env:
4853
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)