Skip to content

Commit 842f9b5

Browse files
authored
ci: tweaking conditional to not perform publish to pypi if no release was generated (#6)
* ci: tweaking conditional to not perform publish to pypi if no release was generated * chore: tweaking patch tags
1 parent 873515c commit 842f9b5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/cd.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
path: dist
8181

8282
- name: Python Semantic Release
83+
id: semantic-release
8384
if: ${{ github.ref == 'refs/heads/main' }}
8485
uses: python-semantic-release/python-semantic-release@master
8586
with:
@@ -88,7 +89,7 @@ jobs:
8889
root_options: $DRY_RUN
8990

9091
- name: Publish to PyPI
91-
if: ${{ !inputs.dry_run }}
92+
if: ${{ !inputs.dry_run && steps.semantic-release.outputs.released == 'true' }}
9293
uses: pypa/gh-action-pypi-publish@release/v1
9394
with:
9495
packages-dir: dist

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ prerelease = false
287287
[tool.semantic_release.commit_parser_options]
288288
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "style", "refactor", "test"]
289289
minor_tags = ["feat"]
290-
patch_tags = ["fix", "perf", "docs"]
290+
patch_tags = ["fix", "perf", "docs", "chore", "ci", "refactor"]
291291

292292
[tool.semantic_release.publish]
293293
dist_glob_patterns = ["dist/*.whl"] # order here is important to ensure compiler wheel is published first

0 commit comments

Comments
 (0)