2.0.1 #3
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: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: NPM Publish | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
permissions: | |
contents: read # Allow reading repository contents | |
id-token: write # Allow writing an OIDC token for authentication | |
steps: | |
- uses: actions/checkout@v4 # Check out the repository code | |
- name: Setup Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: "https://registry.npmjs.org" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Build the project (if applicable) | |
run: npm run build --if-present | |
- name: Publish to npm | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |