Publish package to npmjs (using Yarn) #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
# .github/workflows/publish-npm.yml | |
# This workflow pushes new published releases to https://www.npmjs.com using | |
# the Yarn Package Manager. | |
name: Publish package to npmjs (using Yarn) | |
on: | |
release: | |
types: [published] | |
workflow_call: | |
secrets: | |
NPM_TOKEN: | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.16.x' # Use LTS | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@octocat' | |
- run: yarn | |
- run: yarn publish-repo | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |