Skip to content
Closed
Show file tree
Hide file tree
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
14 changes: 11 additions & 3 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ permissions:
pull-requests: write # 用于创建 PR

jobs:
setup:
uses: ./.github/workflows/setup.yaml
secrets: inherit
with:
python-version: "3.12"
install-deps: "none" # 我们不需要安装依赖,因为 commitizen-action 会处理

bump-version:
needs: setup
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
Expand All @@ -31,13 +39,13 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- id: cz
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: body.md
increment: ${{ github.event.inputs.increment }}

Expand All @@ -47,4 +55,4 @@ jobs:
body_path: body.md
tag_name: ${{ env.REVISION }}
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ permissions:
pull-requests: write # 用于创建 PR

jobs:
setup:
uses: ./.github/workflows/setup.yaml
secrets: inherit
with:
python-version: "{{cookiecutter.max_python_version}}"
install-deps: "none" # 我们不需要安装依赖,因为 commitizen-action 会处理

bump-version:
needs: setup
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
Expand All @@ -31,13 +39,13 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- id: cz
name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
changelog_increment_filename: body.md
increment: ${{ github.event.inputs.increment }}

Expand All @@ -47,4 +55,4 @@ jobs:
body_path: body.md
tag_name: ${{ env.REVISION }}
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Reusable Setup

on:
workflow_call:
inputs:
python-version:
required: false
type: string
default: "{{cookiecutter.max_python_version}}"
default: "3.12"
install-deps:
required: false
type: string
Expand Down
Loading