Skip to content

Publish Package to npmjs #2

Publish Package to npmjs

Publish Package to npmjs #2

Workflow file for this run

name: Publish Package to npmjs
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --immutable
- name: Copy README
run: cp README.md packages/upset/README.md
- name: Extract tag name
id: get_tag
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Change directory and publish
run: cd packages/upset && npm publish --tag ${{ steps.get_tag.outputs.TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}