chore(publish): release v1.1.12 #30
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- v** | |
workflow_dispatch: # 新增手动触发入口 | |
inputs: | |
version: | |
description: 'Release version (格式 vX.Y.Z)' | |
required: true | |
skip-notification: | |
description: '跳过通知 (true/false)' | |
default: 'false' | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# 手动触发时创建标签 | |
- name: Create tag (manual) | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git tag ${{ inputs.version }} | |
git push origin ${{ inputs.version }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.14 | |
- name: Install deps | |
run: npm install -f | |
- name: Build | |
run: npm run build | |
- name: Release to GitHub | |
run: npm run release | |
- name: Notify release | |
if: ${{ !contains(github.event.inputs.skip-notification, 'true') }} | |
uses: apexskier/github-release-commenter@v1 | |
continue-on-error: true | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
comment-template: | | |
:rocket: _This ticket has been resolved in {release_tag}. See {release_link} for release notes._ |