diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a4b2876..967b9d4 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -80,6 +80,7 @@ jobs: path: dist - name: Python Semantic Release + id: semantic-release if: ${{ github.ref == 'refs/heads/main' }} uses: python-semantic-release/python-semantic-release@master with: @@ -88,7 +89,7 @@ jobs: root_options: $DRY_RUN - name: Publish to PyPI - if: ${{ !inputs.dry_run }} + if: ${{ !inputs.dry_run && steps.semantic-release.outputs.released == 'true' }} uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist diff --git a/pyproject.toml b/pyproject.toml index ec309a3..a7fa735 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -287,7 +287,7 @@ prerelease = false [tool.semantic_release.commit_parser_options] allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"] minor_tags = ["feat"] -patch_tags = ["fix", "perf", "docs"] +patch_tags = ["fix", "perf", "docs", "chore", "ci", "refactor"] [tool.semantic_release.publish] dist_glob_patterns = ["dist/*.whl"] # order here is important to ensure compiler wheel is published first