删除 .github/workflows/release.yml
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # 必须抓取完整历史才能生成日志
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
|
||||
# 步骤 1: 本地生成 Changelog (不依赖 GitHub API)
|
||||
- name: Generate Changelog
|
||||
run: |
|
||||
npx conventional-changelog-cli -p angular -i CHANGELOG.md -s
|
||||
# 说明: 这会根据你的 commit 记录生成 CHANGELOG.md 文件
|
||||
|
||||
# 步骤 2: 发布 Release 到 Gitea
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
body_path: CHANGELOG.md # 把生成的内容作为 Release 的描述
|
||||
files: | # 如果你有构建产物想上传,写在这里
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GGITEA_TOKEN }}
|
||||
# 关键: 如果 softprops 无法自动识别 Gitea,有时需要指定 URL,
|
||||
# 但通常 Gitea Runner 会自动注入 GITHUB_API_URL 环境变量,
|
||||
# 所以大多数情况下直接用即可。
|
||||
Reference in New Issue
Block a user