101
node-version-file: .nvmrc
102
registry-url: "https://registry.npmjs.org"
103
104
- # Trusted Publishing (OIDC) needs npm >= 11.5.1; the version bundled with
105
- # Node 20 is older, so upgrade before publishing.
104
+ # Trusted Publishing (OIDC) needs npm >= 11.5.1. .nvmrc pins the Node
105
+ # version (>= 22.14.0, also an OIDC requirement); npm still needs
106
+ # upgrading past whatever ships with it.
107
- name: Upgrade npm for Trusted Publishing
108
shell: bash
109
run: npm install -g npm@latest
110
110
- # BOOTSTRAP: the @getsigit/* packages don't exist yet, and npm can't
111
- # configure a Trusted Publisher for a package that has never been
112
- # published. So the first scope-cutover release authenticates with a
113
- # token. Once the packages exist, configure Trusted Publishing on npmjs.com
114
- # for each package and delete this env block to go fully tokenless.
111
+ # Authentication is OIDC: each @getsigit/* package has a Trusted
112
+ # Publisher pointing at this workflow, so there is no token to leak.
113
- name: Publish platform package to NPM
116
- env:
117
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
114
shell: bash
115
run: |
116
cd npm
163
exit 0
164
fi
165
170
- npm publish --access public --provenance
166
+ npm publish --access public
167
168
publish-npm-base:
169
name: Publish base NPM package (@getsigit/sigit)
193
node-version-file: .nvmrc
194
registry-url: "https://registry.npmjs.org"
195
200
- # Trusted Publishing (OIDC) needs npm >= 11.5.1; the version bundled with
201
- # Node 20 is older, so upgrade before publishing.
196
+ # Trusted Publishing (OIDC) needs npm >= 11.5.1. .nvmrc pins the Node
197
+ # version (>= 22.14.0, also an OIDC requirement); npm still needs
198
+ # upgrading past whatever ships with it.
199
- name: Upgrade npm for Trusted Publishing
200
shell: bash
201
run: npm install -g npm@latest
202
206
- # BOOTSTRAP: token auth for the first @getsigit release (see the platform
207
- # job above). Drop this env block once Trusted Publishing is configured.
203
- name: Publish base package to NPM
209
- env:
210
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
204
shell: bash
205
run: |
206
cd npm/sigit
221
222
npm install
223
npm run build
231
- npm publish --access public --provenance
224
+ npm publish --access public