Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
permissions:
contents: read
packages: write
# id-token: write required for get-vault-secrets
# id-token: write required for get-vault-secrets and trusted publishing
id-token: write
outputs:
new_version: ${{ steps.version_check.outputs.version }}
Expand Down Expand Up @@ -46,6 +46,9 @@ jobs:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install npm version ^11.5.1 # npm trusted publishing requires version ^11.5.1
run: npm install -g npm@^11.5.1

- name: Install dependencies
if: steps.version_check.outputs.changed == 'true'
run: yarn
Expand All @@ -54,18 +57,9 @@ jobs:
if: steps.version_check.outputs.changed == 'true'
run: yarn build

- name: Get secrets from vault
id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
NPM_TOKEN=npm-release:npm_token

- name: Publish package to NPM
if: steps.version_check.outputs.changed == 'true'
run: npm publish --access public --scope grafana
env:
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}

- name: Setup .npmrc file for GitHub Packages
if: steps.version_check.outputs.changed == 'true'
Expand Down Expand Up @@ -96,7 +90,7 @@ jobs:
- name: Create Release Notes
uses: actions/[email protected]
env:
TAG_NAME: "v${{ needs.npm-publish.outputs.new_version }}"
TAG_NAME: 'v${{ needs.npm-publish.outputs.new_version }}'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"files": [
"dist"
],
"repository": "github:grafana/grafana-aws-sdk-react",
"repository": {
"type": "git",
"url": "https://github.com/grafana/grafana-aws-sdk-react.git"
},
"author": "Grafana Labs <[email protected]> (https://grafana.com)",
"license": "Apache-2.0",
"dependencies": {
Expand Down