Skip to content

Publish Packages to NPM #116

Publish Packages to NPM

Publish Packages to NPM #116

Workflow file for this run

name: Publish Packages to NPM
on:
workflow_dispatch:
inputs:
releaseType:
type: choice
description: Release type
required: true
options:
- release
- prerelease
- graduate
env:
HUSKY: 0
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
GH_TOKEN: ${{secrets.PUBLISH_TOKEN}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{secrets.PUBLISH_TOKEN}}
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: git config --global user.email "129169430+motion-canvas-bot@users.noreply.github.com"
- run: git config --global user.name "motion-canvas-bot"
- run: npm ci
- run: npx lerna run build
- if: ${{ inputs.releaseType == 'release' }}
run: npx lerna publish --yes
- if: ${{ inputs.releaseType == 'prerelease' }}
run: npx lerna publish --yes --conventional-prerelease --dist-tag alpha
- if: ${{ inputs.releaseType == 'graduate' }}
run: npx lerna publish --yes --conventional-graduate