Skip to content

Commit e7f344b

Browse files
committed
chore(worflows): configure for npm trusted publishers
1 parent aeef37d commit e7f344b

4 files changed

Lines changed: 5 additions & 13 deletions

File tree

.github/workflows/actions/publish-npm/action.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ inputs:
1010
folder:
1111
default: './'
1212
description: 'A folder containing a package.json file.'
13-
token:
14-
description: 'The NPM authentication token required to publish.'
15-
1613
createRelease:
1714
description: 'Create a release on GitHub.'
1815
default: 'false'
19-
2016
ghToken:
2117
description: 'The GitHub authentication token required to create a release.'
2218

@@ -49,12 +45,6 @@ runs:
4945
run: npm run build
5046
shell: bash
5147
working-directory: ${{ inputs.working-directory }}
52-
- name: Prepare NPM Token
53-
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
54-
working-directory: ${{ inputs.working-directory }}
55-
shell: bash
56-
env:
57-
NPM_TOKEN: ${{ inputs.token }}
5848
- name: Publish to NPM
5949
run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
6050
shell: bash

.github/workflows/dev-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
tag: dev
3434
version: ${{ needs.create-dev-hash.outputs.dev-hash }}
3535
working-directory: './'
36-
token: ${{ secrets.NPM_TOKEN }}
3736
createRelease: 'false'
3837

3938
get-build:

.github/workflows/production-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ jobs:
2424
tag: latest
2525
version: ${{ inputs.version }}
2626
working-directory: './'
27-
token: ${{ secrets.NPM_TOKEN }}
2827
createRelease: true
2928
ghToken: ${{ secrets.IONITRON_TOKEN }}

.github/workflows/release-orchestrator.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
- minor
2020
- major
2121

22+
permissions:
23+
id-token: write
24+
contents: read
25+
2226
jobs:
2327
run-dev:
2428
if: ${{ inputs.release-type == 'dev' }}
@@ -30,4 +34,4 @@ jobs:
3034
uses: ./.github/workflows/production-release.yml
3135
secrets: inherit
3236
with:
33-
version: ${{ inputs.version }}
37+
version: ${{ inputs.version }}

0 commit comments

Comments
 (0)