Skip to content

Commit

Permalink
chore(release): update release .yaml to include auto-update of .toml
Browse files Browse the repository at this point in the history
  • Loading branch information
EgonFerri committed Oct 25, 2024
1 parent b04a11f commit 046344c
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 82 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Conventional Changelog Action
- name: Generate changelog and determine version
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
Expand All @@ -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
7 changes: 0 additions & 7 deletions Makefile

This file was deleted.

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
Loading

0 comments on commit 046344c

Please sign in to comment.