Skip to content

Commit

Permalink
Create on_release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Nov 25, 2023
1 parent 40304e0 commit d8aadf4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/on_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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 add pyproject.toml
git commit -m "Update version to ${tag_name}"
git push

0 comments on commit d8aadf4

Please sign in to comment.