v5.0.1 #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Reconfigure git to use HTTP authentication | |
run: > | |
git config --global url."https://github.com/".insteadOf | |
ssh://[email protected]/ | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
- name: set version | |
run: | | |
npm version --no-git-tag-version "$TAG" | |
env: | |
CI: true | |
TAG: ${{ github.event.release.tag_name }} | |
- name: npm install and build | |
run: | | |
npm ci | |
npm run build | |
env: | |
CI: true | |
- name: publish | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | |
npm publish --provenance | |
env: | |
CI: true | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |