Skip to content

v0.2.6-rc.2

v0.2.6-rc.2 #5

Workflow file for this run

name: Publish Package to npmjs
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: "The version to release. The version should be the same as version in package.json. For example, 1.0.0"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'workflow_dispatch'
with:
fetch-tags: true
ref: ${{ inputs.version }}
- uses: actions/checkout@v4
if: github.event_name != 'workflow_dispatch'
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}