NPM publish #1
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: NPM publish | |
on: | |
release: | |
types: [released] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
# environment: release | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Set Yarn version | |
run: yarn set version 4.5.0 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Publish to NPM | |
run: npm publish --provenance --access public | |
# run: yarn npm publish --access public | |
# Note: At this time, yarn is not a supported tool for publishing your packages with provenance. | |
# https://docs.npmjs.com/generating-provenance-statements#using-third-party-package-publishing-tools | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |