Skip to content

Publish Packages to NPM #132

Publish Packages to NPM

Publish Packages to NPM #132

Workflow file for this run

name: Publish Packages to NPM
on:
workflow_dispatch:
inputs:
releaseType:
type: choice
description: Release type
required: true
options:
- release
- canary
version:
type: string
description: Version
required: true
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@v4
with:
fetch-depth: 0
token: ${{secrets.PUBLISH_TOKEN}}
submodules: true
- name: Initialize and update submodules
run: |
git submodule init
git submodule update --recursive
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "revideo-bot"
- run: npm ci
- run: npx lerna run build
- if: ${{ inputs.releaseType == 'release' }}
run: npx lerna publish --yes --force-publish --exact ${{ inputs.version }}
- if: ${{ inputs.releaseType == 'canary' }}
run: npx lerna publish --yes --canary --force-publish