Skip to content

Commit 5772d82

Browse files
feat: Enhance release workflows with NPM updates and environment variable configurations
1 parent 37e2608 commit 5772d82

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ jobs:
249249
- drizzle-arktype
250250
- eslint-plugin-drizzle
251251
runs-on: ubuntu-22.04
252+
permissions:
253+
id-token: write
254+
# force empty so npm can use OIDC
255+
env:
256+
NODE_AUTH_TOKEN: ""
257+
NPM_TOKEN: ""
252258
steps:
253259
- uses: actions/checkout@v4
254260

@@ -284,6 +290,14 @@ jobs:
284290
- name: Install Bun
285291
uses: oven-sh/setup-bun@v2
286292

293+
# >= 11.5.1 for trusted publishing
294+
- name: Update NPM
295+
run: npm install -g npm@latest
296+
297+
# nuke, so npm can use OIDC
298+
- name: Remove temp npmrc
299+
run: rm -f "$NPM_CONFIG_USERCONFIG"
300+
287301
- name: Check preconditions
288302
id: checks
289303
shell: bash
@@ -346,7 +360,7 @@ jobs:
346360
permissions:
347361
contents: read
348362
id-token: write
349-
# force empty so npm can use OIDC
363+
# force empty so npm can use OIDC
350364
env:
351365
NODE_AUTH_TOKEN: ""
352366
NPM_TOKEN: ""

.github/workflows/release-latest.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ jobs:
235235
- drizzle-arktype
236236
- eslint-plugin-drizzle
237237
runs-on: ubuntu-22.04
238+
permissions:
239+
id-token: write
240+
# force empty so npm can use OIDC
241+
env:
242+
NODE_AUTH_TOKEN: ""
243+
NPM_TOKEN: ""
238244
steps:
239245
- uses: actions/checkout@v4
240246

@@ -270,6 +276,14 @@ jobs:
270276
- name: Install Bun
271277
uses: oven-sh/setup-bun@v2
272278

279+
# >= 11.5.1 for trusted publishing
280+
- name: Update NPM
281+
run: npm install -g npm@latest
282+
283+
# nuke, so npm can use OIDC
284+
- name: Remove temp npmrc
285+
run: rm -f "$NPM_CONFIG_USERCONFIG"
286+
273287
- name: Check preconditions
274288
id: checks
275289
shell: bash

0 commit comments

Comments
 (0)