Skip to content

Commit 190361f

Browse files
abrichrclaude
andcommitted
fix(ci): fix release automation — add version_toml config, gate PyPI publish
Two issues fixed: 1. Missing [tool.semantic_release] version_toml config — semantic-release created tags but never updated pyproject.toml, so poetry kept building v1.0.0 while tags were at v1.0.4. 2. Build step ran when no release was made — now gated on steps.release.outputs.released == 'true'. - Add [tool.semantic_release] section with version_toml pointing to pyproject.toml - Add id: release to PSR step so outputs are accessible - Sync pyproject.toml version to 1.0.4 (matches latest tag) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3545f89 commit 190361f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/release-and-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ jobs:
3838

3939
- name: Python Semantic Release
4040
if: steps.check_skip.outputs.skip != 'true'
41+
id: release
4142
uses: python-semantic-release/python-semantic-release@v10.5.3
4243
with:
4344
github_token: ${{ secrets.ADMIN_TOKEN }}
4445
git_committer_name: "OpenAdapt Bot"
4546
git_committer_email: "bot@openadapt.ai"
4647

4748
- name: Build and publish to PyPI
48-
if: steps.check_skip.outputs.skip != 'true'
49+
if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'
4950
env:
5051
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
5152
run: |

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openadapt"
3-
version = "1.0.0"
3+
version = "1.0.4"
44
description = "GUI automation with ML - record, train, deploy, evaluate"
55
readme = "README.md"
66
requires-python = ">=3.10"
@@ -91,3 +91,13 @@ testpaths = ["tests"]
9191
filterwarnings = [
9292
"ignore::DeprecationWarning",
9393
]
94+
95+
[tool.semantic_release]
96+
version_toml = ["pyproject.toml:project.version"]
97+
branch = "main"
98+
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
99+
100+
[tool.semantic_release.commit_parser_options]
101+
allowed_tags = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "style", "test"]
102+
minor_tags = ["feat"]
103+
patch_tags = ["fix", "perf"]

0 commit comments

Comments
 (0)