publish #30
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] | |
repository_dispatch: | |
types: [publish] | |
workflow_dispatch: | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install npm CLI | |
run: npm install -g npm@latest | |
- name: Install dependencies and build | |
run: | | |
npm -v | |
npm ci | |
npm run build | |
- name: Publish Dry Run | |
run: | | |
npm publish --dry-run | |
- name: Publish the package | |
run: | | |
npm publish --provenance | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |