Skip to content

Release

Release #103

Workflow file for this run

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
with:
version: "latest"
- 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-release --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-release --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 }}