bump: version 0.13.2 → 0.13.3 #11
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: 🔄 Auto Version Bump | |
on: | |
push: | |
branches: | |
- master | |
- main | |
workflow_dispatch: | |
inputs: | |
increment: | |
description: 'Version increment type' | |
required: false | |
default: 'MAJOR' | |
type: choice | |
options: | |
- 'MAJOR' | |
- 'MINOR' | |
- 'PATCH' | |
permissions: | |
contents: write # 用于创建和推送标签 | |
pull-requests: write # 用于创建 PR | |
jobs: | |
bump-version: | |
if: ${{ github.event_name == 'workflow_dispatch' || !startsWith(github.event.head_commit.message, 'bump:') }} | |
runs-on: ubuntu-latest | |
name: Bump version and create changelog with commitizen | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Create bump and changelog | |
uses: commitizen-tools/commitizen-action@master | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
branch: master | |
increment: ${{ github.event.inputs.increment || '' }} | |
no_raise: '21' |