diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 845a030..228f332 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -60,15 +60,20 @@ jobs: ref: tag, sha: context.sha }) + - name: Publish to PyPI if: steps.last_tag.outcome == 'success' env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - LAST_TAG: ${{ steps.last_tag.outputs.version }} + APPLY_TAG: ${{ steps.last_tag.outputs.version }} run: | - python scripts/update_version.py $LAST_TAG - poetry config pypi-token.pypi $PYPI_TOKEN - poetry publish --build + uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version $APPLY_TAG + uv build + uv publish --token $PYPI_TOKEN + + - name: test_installation + if: steps.last_tag.outcome == 'success' + run: uv run --with runnable --no-project -- python -c "import runnable" - name: "Create release" if: steps.last_tag.outcome == 'success' diff --git a/pyproject.toml b/pyproject.toml index 00cda41..4ccaff9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,3 +114,19 @@ file-system = "extensions.run_log_store.file_system:FileSystemRunLogstore" "python" = "runnable.tasks:PythonTaskType" "shell" = "runnable.tasks:ShellTaskType" "notebook" = "runnable.tasks:NotebookTaskType" + +[tool.semantic_release] +commit_parser = "angular" +major_on_zero = true +allow_zero_version = true +tag_format = "{version}" + +[tool.semantic_release.branches.main] +match = "(main|master|release-fix*)" + +[tool.semantic_release.commit_parser_options] +minor_tags = ["feat"] +patch_tags = ["fix", "perf"] +other_allowed_tags = ["build", "chore", "ci", "docs", "style", "refactor", "test"] +allowed_tags = ["feat", "fix", "perf", "build", "chore", "ci", "docs", "style", "refactor", "test"] +default_bump_level = 0