-
Notifications
You must be signed in to change notification settings - Fork 107
51 lines (48 loc) · 1.39 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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