Skip to content

feat(transformer): 2026-08 规范对齐并统一共享 AGENTS.md #14

feat(transformer): 2026-08 规范对齐并统一共享 AGENTS.md

feat(transformer): 2026-08 规范对齐并统一共享 AGENTS.md #14

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
tag:
description: "要发布的 tag (如 v0.1.0)"
required: true
permissions:
contents: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
goreleaser:
name: Goreleaser
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: 检出指定 tag (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
run: git checkout "${{ inputs.tag }}"
- name: 安装 git-cliff
uses: taiki-e/install-action@v2
with:
tool: git-cliff
- name: 生成 changelog (latest tag only)
run: |
git-cliff --config cliff.toml --latest --strip all -o CHANGELOG_LATEST.md
echo "--- generated release notes ---"
cat CHANGELOG_LATEST.md
- name: 运行 goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --release-notes=CHANGELOG_LATEST.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 上传 dist 工件 (调试用)
if: failure()
uses: actions/upload-artifact@v5
with:
name: dist-debug
path: dist/
retention-days: 7