Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: support generate release pr via release-please workflow #535

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
21 changes: 21 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: prepare-release

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
prepare-release:
name: Prepare release
if: github.repository == 'skyclouds2001/template-sky'
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: googleapis/[email protected]
with:
release-type: node
Comment on lines +19 to +21
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

完善 release-please-action 配置

当前配置过于简单,建议添加以下重要配置项以增强发布管理:

  - uses: googleapis/[email protected]
    with:
      release-type: node
+     package-name: ${{ vars.PACKAGE_NAME }}
+     changelog-types: |
+       [
+         {"type":"feat","section":"✨ 新功能","hidden":false},
+         {"type":"fix","section":"🐛 问题修复","hidden":false},
+         {"type":"docs","section":"📝 文档","hidden":false},
+         {"type":"chore","section":"📦 杂项","hidden":true}
+       ]
+     bootstrap-sha: ${{ vars.INITIAL_VERSION_SHA }}
+     token: ${{ secrets.GITHUB_TOKEN }}

这些配置将帮助:

  1. 正确设置包名称
  2. 自定义更新日志格式
  3. 设置版本历史起点
  4. 明确指定令牌来源

Committable suggestion skipped: line range outside the PR's diff.

3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.7.0"
}
9 changes: 9 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"last-release-sha": "0b09f18458634ef89efc52a064f33e4bf8af011a",
"release-type": "node",
"include-component-in-tag": false,
"packages": {
".": {}
}
}
Loading