Skip to content

Publish package to npmjs (using Yarn) #3

Publish package to npmjs (using Yarn)

Publish package to npmjs (using Yarn) #3

Workflow file for this run

# .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 }}