.github/workflows/on_release.yaml #7
Workflow file for this run
This file contains 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
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 add ./pyproject.toml | |
git commit -m "Update version to ${tag_name}" | |
- name: Push changes | |
uses: ad-m/github-push-action@v0.6.0 | |
continue-on-error: true | |
with: | |
branch: main | |
github_token: ${{ github.token }} |