v2.0.2 #4
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: LatestRelease | |
on: | |
# Run a workflow when a release has been released | |
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release | |
release: | |
types: [released] | |
jobs: | |
latest-release: | |
# Do not run if the release is a prerelease or draft | |
# @see https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#release | |
if: ${{ github.event.release.prerelease == false && github.event.release.draft == false }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
cache: "npm" | |
registry-url: "https://registry.npmjs.org" | |
- run: npm ci | |
- name: building | |
run: npm run build | |
- name: publish | |
run: npm publish --provenance --tag=latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |