diff --git a/.github/workflows/new_tag.yml b/.github/workflows/new_tag.yml index 27fe1ca..ace6ca6 100644 --- a/.github/workflows/new_tag.yml +++ b/.github/workflows/new_tag.yml @@ -1,4 +1,4 @@ -name: Tag on version bump +name: Tag on version bump after rebase on: push: @@ -10,33 +10,39 @@ permissions: jobs: tag: - name: Create tag if version changed runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Get current version from pyproject.toml - id: current + - name: Get version from pyproject.toml + id: get_version run: | - VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2) + VERSION=$(grep '^version' pyproject.toml | cut -d '"' -f2) + echo "Detected version: $VERSION" echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Get previous version from main~1 - id: previous + - name: Check if tag exists + id: tag_exists run: | - git checkout HEAD~1 - PREV_VERSION=$(grep '^version =' pyproject.toml | cut -d '"' -f2) - echo "version=$PREV_VERSION" >> $GITHUB_OUTPUT - - - name: Compare versions and create tag if changed - if: steps.current.outputs.version != steps.previous.outputs.version + TAG="v${{ steps.get_version.outputs.version }}" + echo "Checking for tag: $TAG" + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag already exists: $TAG" + echo "exists=true" >> $GITHUB_OUTPUT + else + echo "Tag does not exist: $TAG" + echo "exists=false" >> $GITHUB_OUTPUT + fi + + - name: Create and push tag + if: steps.tag_exists.outputs.exists == 'false' run: | + TAG="v${{ steps.get_version.outputs.version }}" git config user.name "github-actions[bot]" - TAG="v${{ steps.current.outputs.version }}" + echo "Creating tag: $TAG" git tag "$TAG" git push origin "$TAG" diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4b83832 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +## v0.2.0 (2025-09-23) + +### Feat + +- allow empty output workables +- init project + +### Fix + +- search for the common merge ancestor +- add task done on empty output +- move sleep outside of lock +- correct work function expecting tuple as result +- correct test syncqueue types +- correct sync queue generics +- correct uv dependencies +- correct makefile command +- correct library name in docs + +### Refactor + +- add tag on pull request +- call cz via uv +- bundle worker output +- reduce output to console +- add better typing to workable manager +- improve workable types +- add better typing to worker +- change types of workable +- move uv to PATH an act diff --git a/README.md b/README.md index 49900e4..cb29673 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # mPyFlow -[![release: 0.1.0](https://img.shields.io/badge/rel-0.1.0-blue.svg?style=flat-square)](https://github.com/artdotlis/mPyFlow) +[![release: 0.2.0](https://img.shields.io/badge/rel-0.2.0-blue.svg?style=flat-square)](https://github.com/artdotlis/mPyFlow) [![MIT LICENSE](https://img.shields.io/badge/License-MIT-brightgreen.svg?style=flat-square)](https://choosealicense.com/licenses/mit/) [![Documentation Status](https://img.shields.io/badge/docs-GitHub-blue.svg?style=flat-square)](https://artdotlis.github.io/mPyFlow/) diff --git a/pyproject.toml b/pyproject.toml index c8488cc..0f0f265 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mpyflow" -version = "0.1.0" +version = "0.2.0" description = """mPyFlow is a library designed to manage multiprocessing workflows.""" readme = "README.md" diff --git a/uv.lock b/uv.lock index c6dc5c8..004c6e2 100644 --- a/uv.lock +++ b/uv.lock @@ -504,7 +504,7 @@ wheels = [ [[package]] name = "mpyflow" -version = "0.1.0" +version = "0.2.0" source = { editable = "." } dependencies = [ { name = "rich" },