Skip to content

Commit

Permalink
chore: update release.yml to update version in .toml
Browse files Browse the repository at this point in the history
  • Loading branch information
EgonFerri authored Oct 25, 2024
1 parent 0a37920 commit 9991b09
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ jobs:
skip-on-empty: false
skip-version-file: true

- name: Update version in pyproject.toml
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: |
VERSION=${{ steps.changelog.outputs.tag }}
sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
shell: bash

- name: Commit updated version
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: |
git config --local user.name "${{ github.actor }}"
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git add pyproject.toml
git commit -m "chore: update version to ${{ steps.changelog.outputs.tag }}"
git push
- name: Create Release
uses: softprops/action-gh-release@v2
if: ${{ steps.changelog.outputs.skipped == 'false' }}
Expand Down

0 comments on commit 9991b09

Please sign in to comment.