Skip to content

Commit

Permalink
chore(release): fix release workflow to include .toml update
Browse files Browse the repository at this point in the history
  • Loading branch information
EgonFerri committed Oct 25, 2024
1 parent b04a11f commit ac08680
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# Update version in pyproject.toml before generating the changelog and tag
- name: Update version in pyproject.toml
run: |
VERSION="v$(date +'%Y.%m.%d')" # Alternatively, get the version from another source
sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
shell: bash

- name: Commit updated version
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 $VERSION"
git push
# Generate changelog and create the release tag
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ufoid"
version = "0.1.1"
version = "0.1.0"
description = "Ultra Fast Optimized Image Deduplication"
readme = "README.md"
requires-python = ">=3.9"
Expand Down

0 comments on commit ac08680

Please sign in to comment.