-
Notifications
You must be signed in to change notification settings - Fork 7
101 lines (81 loc) · 2.58 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Release
on:
workflow_dispatch:
inputs:
from-package:
description: "From package deployment"
required: false
type: boolean
default: false
concurrency: release
jobs:
release:
name: Run lerna publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_GITHUB_TOKEN_PUBLIC }}
fetch-depth: 0
- uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build TS output
run: pnpm build
- name: Make sure repository is clean
run: git diff --exit-code
- name: Configure git user
run: |
git config --global user.email "${{ secrets.BOT_EMAIL }}"
git config --global user.name "${{ secrets.BOT_NAME }}"
- name: Set publish config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish packages
if: ${{ github.event.inputs.from-package != true }}
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN_PUBLIC }}
run: |
pnpm lerna publish --skip-bump-only-releases --yes
- name: Publish packages from package
if: ${{ github.event.inputs.from-package == true }}
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN_PUBLIC }}
run: |
pnpm lerna publish from-package --skip-bump-only-releases --yes
docs:
name: Update and publish documentation
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_GITHUB_TOKEN_PUBLIC }}
- uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build documentation
run: pnpm typedoc
env:
NODE_OPTIONS: --max_old_space_size=6144
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: docs
folder: docs
token: ${{ secrets.BOT_GITHUB_TOKEN_PUBLIC }}
commit-message: "docs: update documentation"
git-config-name: ${{ secrets.BOT_NAME }}
git-config-email: ${{ secrets.BOT_EMAIL }}