Skip to content

ver update

ver update #48

Workflow file for this run

name: Tag
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
tag:
name: Tag Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: '0'
- name: Bump version and push tag
id: tag
uses: anothrNick/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.TAG_TOKEN }}
WITH_V: true
- name: Update package version
if: steps.tag.outputs.new_tag
run: |
# Extract version without the 'v' prefix
VERSION=${GITHUB_REF_NAME#v}
# For a Python package
sed -i "s/version=.*,/version='${VERSION}',/" setup.py
# OR for projects using pyproject.toml
# sed -i "s/version = .*/version = \"${VERSION}\"/" pyproject.toml
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "chore: bump version to ${VERSION}"
git push