Delete repo_scaffold/templates/template-python/{{cookiecutter.project… #61
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: Bump version | |
on: | |
push: | |
branches: | |
- master | |
- main | |
workflow_dispatch: | |
inputs: | |
increment: | |
description: 'Version increment (major, minor, patch)' | |
required: false | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
default: patch | |
permissions: | |
contents: write # 用于创建和推送标签 | |
pull-requests: write # 用于创建 PR | |
jobs: | |
bump-version: | |
if: "!startsWith(github.event.head_commit.message, 'bump:')" | |
runs-on: ubuntu-latest | |
name: "Bump version and create changelog with commitizen" | |
steps: | |
- name: Load secret | |
uses: 1password/load-secrets-action@v2 | |
with: | |
export-env: true | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
PERSONAL_ACCESS_TOKEN: op://shawndengdev/github_access_token/credential | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: '${{ env.PERSONAL_ACCESS_TOKEN }}' | |
- name: Create bump and changelog | |
uses: commitizen-tools/commitizen-action@master | |
with: | |
github_token: ${{ env.PERSONAL_ACCESS_TOKEN }} | |
branch: master |