Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
name: Release

run-name: ${{ github.workflow }} v${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Bump version (e.g., 4.0.0, 4.1.0-alpha.1, 5.0.0-beta.2)'
required: true
type: string
tag:
description: 'npm dist-tag to publish under (leave empty to fallback to preid, or "latest" for stable)'
required: false
type: string
skip_git_check:
description: Skip git checks when publishing (--no-git-checks)
required: false
type: boolean
default: false
skip_bump:
description: Skip version bump (bumpp) step
required: false
type: boolean
default: false
skip_changelog:
description: Skip changelog generation (changelogithub) step
required: false
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -54,16 +73,13 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- run: pnpm run packages:bump ${{ github.event.inputs.version }} --yes
if: ${{ github.event.inputs.skip_bump != 'true' }}

- run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- run: pnpm run packages:changelog:github
Comment thread
dinwwwh marked this conversation as resolved.
if: ${{ github.event.inputs.skip_changelog != 'true' }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# TODO: remove `--no-git-checks` and `latest` -> `v1` when v2 stable
- run: pnpm run packages:publish --tag=${{ steps.version.outputs.preid || 'latest' }} --no-git-checks
- run: pnpm run packages:publish --tag=${{ github.event.inputs.tag || steps.version.outputs.preid || 'latest' }} ${{ github.event.inputs.skip_git_check == 'true' && '--no-git-checks' || '' }}
Comment thread
dinwwwh marked this conversation as resolved.
env:
NPM_CONFIG_PROVENANCE: true
Comment thread
dinwwwh marked this conversation as resolved.

- run: pnpm run packages:changelog:github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading