Skip to content

Commit 7fbf850

Browse files
authored
refactor: move to OIDC publications (#90)
* Revert "refactor: move to OIDC publications (#89)" This reverts commit 2b08417. * refactor: move to OIDC publications
1 parent 56a0ea6 commit 7fbf850

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

.github/workflows/pkg-release.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
1-
# This filename is associated with the respective NPM package's trusted publish config.
2-
# If required, update both together.
3-
4-
name: Package Release
1+
name: Publish to npm
52

63
on:
74
push:
85
tags:
9-
- 'v*.*.*'
10-
11-
workflow_dispatch:
12-
inputs:
13-
tag:
14-
description: 'Tag to publish (e.g. v1.2.3 or v1.2.3-rc.1)'
15-
required: true
16-
type: string
6+
- 'v*'
177

188
permissions:
199
contents: read
20-
id-token: write # required for OIDC-based publishing
10+
id-token: write
2111

2212
jobs:
23-
call-npm-release:
24-
uses: postmanlabs/gh-security-scan-workflow/.github/workflows/security-npm-publish.yml@main
13+
publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v6
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version: '24'
23+
registry-url: 'https://registry.npmjs.org'
2524

26-
with:
27-
tag: ${{ github.ref_type == 'tag' && github.ref_name || inputs.tag }}
28-
node_version: '22'
29-
package_path: 'dist'
30-
skip_tests: true
31-
dry_run: ${{ github.event_name == 'workflow_dispatch' }}
25+
- name: Install dependencies
26+
run: npm ci
3227

33-
secrets:
34-
POSTMAN_NPM_TOKEN: ${{ secrets.POSTMAN_NPM_TOKEN }} # read-only granular token
28+
- name: Publish to npm
29+
if: github.ref_type == 'tag'
30+
run: npm publish --provenance --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.POSTMAN_NPM_TOKEN }}

0 commit comments

Comments
 (0)