unofficial action to update your version using astral-sh/uv and create git tag according to PEP440
- bump version with uv (update pyproject.toml+uv.lock) and push to origin
- create a git tag for new version and push to remote
- return
VERSIONfor further usage
| argument | default | description |
|---|---|---|
bump |
minor |
Version Bump (major, minor, patch + alpha, beta, rc, post, and dev, ie "minor dev") |
github_token |
${{ github.token }} |
GITHUB_TOKEN for updating pyproject.toml and uv.lock and pushing version as tag |
commit_message |
bump to version |
git commit message |
tag_message |
version |
git tag message |
tag_prefix |
empty | prefix for git tag |
- name: Version Bump
uses: rehborn/[email protected]
with:
bump: "major dev"
github_token: ${{ secrets.GITHUB_TOKEN }} - name: Version Bump
uses: rehborn/[email protected]
with:
bump: "major dev"
github_token: ${{ secrets.GITHUB_TOKEN }}
commit_message: 'Bump Release Version'
tag_message: 'Release'name: Bump Version
on:
workflow_dispatch:
inputs:
bump:
required: false
description: Version Bump (major, minor, patch + alpha, beta, rc, post, and dev)
type: string
default: 'patch'
jobs:
bump:
name: Version Bump
runs-on: ubuntu-latest
permissions:
contents: write
# store for use with reusable actions
outputs:
VERSION: "${{ steps.version.outputs.VERSION }}"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Version Bump
id: version
uses: rehborn/[email protected]
with:
bump: ${{ inputs.bump }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# Access VERSION in job
output:
needs: bump
runs-on: ubuntu-latest
name: test output
steps:
- name: test
run: echo ${{ needs.bump.outputs.VERSION }}
# Pass VERSION to Jobs
build:
needs: bump
permissions:
packages: write
contents: write
id-token: write
uses: ./.github/workflows/build.yml
secrets: inherit
with:
version: ${{ needs.bump.outputs.VERSION }}
release:
needs:
- bump
- build
permissions:
packages: write
contents: write
uses: ./.github/workflows/release.yml
secrets: inherit
with:
version: ${{ needs.bump.outputs.VERSION }}