Skip to content

Commit

Permalink
✨ Update release workflow to get current version and bump version con…
Browse files Browse the repository at this point in the history
…ditionally

* 🛠️ Remove unused SSH key from release workflow

* ✨ Add write permissions for contents in release workflow

* ✨ Update release workflow to get current version and bump version conditionally
  • Loading branch information
grelinfo authored Nov 27, 2024
1 parent 029a014 commit 74b1af5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
types:
- published

permissions:
contents: write

jobs:
bump-version:
runs-on: ubuntu-latest
Expand All @@ -22,7 +25,11 @@ jobs:
- name: Get release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Bump version
- name: Get current version
run: echo "CURRENT_VERSION=$(uv run hatch version)" >> $GITHUB_ENV

- name: Bump version if necessary
if: ${{ env.RELEASE_VERSION != env.CURRENT_VERSION }}
run: uv run hatch version $RELEASE_VERSION

- name: Commit and push changes
Expand Down

0 comments on commit 74b1af5

Please sign in to comment.