diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4a12d1..af1e525 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index cc9dc80..0493617 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"