File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 44 branches :
55 - main
66
7+ permissions : {}
8+
79jobs :
810 npm-publish :
911 name : Publish to NPM & GitHub Package Registry
1012 runs-on : ubuntu-latest
13+ # Required for this workflow to have permission to publish NPM packages
14+ environment : release
1115 outputs :
1216 new_version : ${{ steps.version_check.outputs.version }}
1317 version_changed : ${{ steps.version_check.outputs.changed }}
1418 permissions :
1519 contents : write
16- # id-token: write is required for the get-vault-secrets step
20+ # id-token: write required for npm trusted publishing
1721 id-token : write
1822 steps :
1923 - name : Checkout repository
4347 node-version-file : ' .nvmrc'
4448 registry-url : ' https://registry.npmjs.org'
4549
50+ - name : Install npm version ^11.5.1 # npm trusted publishing requires version ^11.5.1
51+ if : steps.version_check.outputs.changed == 'true'
52+ run : npm install -g npm@^11.5.1
53+
4654 - name : Install dependencies
4755 if : steps.version_check.outputs.changed == 'true'
4856 run : yarn
5159 if : steps.version_check.outputs.changed == 'true'
5260 run : yarn build
5361
54- - name : Get secrets from vault
55- id : get-secrets
56- uses : grafana/shared-workflows/actions/get-vault-secrets@main
57- with :
58- repo_secrets : |
59- NPM_TOKEN=npm-release:npm_token
60-
6162 - name : Publish package to NPM
6263 if : steps.version_check.outputs.changed == 'true'
63- run : npm publish --access public --scope grafana
64- env :
65- NODE_AUTH_TOKEN : ${{ env.NPM_TOKEN }}
64+ run : npm publish --access public
6665
6766 - name : Setup .npmrc file for GitHub Packages
6867 if : steps.version_check.outputs.changed == 'true'
You can’t perform that action at this time.
0 commit comments