Skip to content

.github/workflows/on_release.yaml #3

.github/workflows/on_release.yaml

.github/workflows/on_release.yaml #3

Workflow file for this run

on:
release:
types: [published]
jobs:
change_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update version in pyproject.toml
run: |
tag_name=$(echo "${{ github.event.release.tag_name }}" | sed 's/^v//')
sed -i "s/version = .*/version = '${tag_name}'/" pyproject.toml
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git checkout -b main
git add pyproject.toml
git commit -m "Update version to ${tag_name}"
git push