Skip to content

Commit e7b6cb9

Browse files
committed
fix tag convention: clastic uses bare version tags (no v prefix)
Update publish.yml trigger pattern and TAG extraction to not strip a v prefix. Update release skill to document bare tags.
1 parent 9025833 commit e7b6cb9

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Publish to PyPI
33
on:
44
push:
55
tags:
6-
- "v[0-9]*.[0-9]*.[0-9]*"
6+
- "[0-9]*.[0-9]*.[0-9]*"
77

88
jobs:
99
build:
@@ -22,7 +22,7 @@ jobs:
2222
echo "::error::Version $VERSION contains dev suffix."
2323
exit 1
2424
fi
25-
TAG=${GITHUB_REF#refs/tags/v}
25+
TAG=${GITHUB_REF#refs/tags/}
2626
if [ "$VERSION" != "$TAG" ]; then
2727
echo "::error::Tag $TAG does not match __version__ ($VERSION)"
2828
exit 1
@@ -60,7 +60,7 @@ jobs:
6060
python-version: "3.11"
6161
- name: Wait for PyPI
6262
run: |
63-
TAG=${GITHUB_REF#refs/tags/v}
63+
TAG=${GITHUB_REF#refs/tags/}
6464
for i in $(seq 1 30); do
6565
if curl -s -f "https://pypi.org/pypi/clastic/$TAG/json" > /dev/null; then
6666
echo "clastic $TAG available on PyPI"
@@ -71,7 +71,7 @@ jobs:
7171
done
7272
- name: Install from PyPI and verify
7373
run: |
74-
TAG=${GITHUB_REF#refs/tags/v}
74+
TAG=${GITHUB_REF#refs/tags/}
7575
uv pip install --system clastic==$TAG --index-url https://pypi.org/simple/
7676
INSTALLED=$(cd /tmp && python -c "import clastic; print(clastic.__version__)")
7777
echo "Installed version: $INSTALLED"

.omp/skills/release/SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ clastic uses CalVer: `YY.MINOR.MICRO` (e.g. `26.0.1`). The version lives in
1212
`clastic/__init__.py` as a `__version__` literal string. During development it
1313
carries a `dev` suffix (e.g. `26.0.1dev`). Flit reads this at build time.
1414

15-
Tags use the `v` prefix (e.g. `v26.0.1`, NOT `26.0.1`). The publish workflow
16-
triggers on tags matching `v[0-9]*.[0-9]*.[0-9]*`.
15+
Tags do NOT use a `v` prefix (e.g. `26.0.1`, NOT `v26.0.1`). The publish workflow
16+
triggers on tags matching `[0-9]*.[0-9]*.[0-9]*`.
1717

1818
## Pre-flight checks
1919

@@ -88,10 +88,10 @@ Use the exact format `clastic version X.Y.Z` for the commit message.
8888
### 5. Tag the release
8989

9090
```bash
91-
git tag -a v26.0.1 -m "short summary of key changes in this release"
91+
git tag -a 26.0.1 -m "short summary of key changes in this release"
9292
```
9393

94-
Tags use the `v` prefix. The tag message should be a short,
94+
Tags do NOT use a prefix. The tag message should be a short,
9595
lowercase, descriptive summary of the release (not just the version number).
9696
Examples:
9797

@@ -124,7 +124,7 @@ This triggers two GitHub Actions workflows:
124124
- `Publish to PyPI` (on the tag)
125125

126126
The publish workflow validates that `__version__` on the tagged commit does
127-
not contain `dev` and matches the tag (after stripping the `v` prefix). It
127+
not contain `dev` and matches the tag. It
128128
parses `__version__` from the file with `sed` rather than importing the module
129129
(the build job does not install dependencies). If either check fails,
130130
publishing is blocked.
@@ -155,14 +155,14 @@ Report the results to the user.
155155
- **Failed release** (tag exists locally/on GitHub but not on PyPI): PyPI is
156156
the source of truth. Delete the stale tag locally and on the remote:
157157
```bash
158-
git tag -d vX.Y.Z
159-
git push origin :refs/tags/vX.Y.Z # if it was pushed
158+
git tag -d X.Y.Z
159+
git push origin :refs/tags/X.Y.Z # if it was pushed
160160
```
161161
Then check `__version__` in `clastic/__init__.py`. If it was already bumped
162162
past the failed release (e.g. `X.Y.(Z+1)dev`), reset it to `X.Y.Zdev` so
163163
the release flow strips the suffix to the correct version. Amend or revert
164164
the bump commit as needed, then restart the release from step 1.
165-
- **Wrong version tagged**: `git tag -d vX.Y.Z && git push origin :refs/tags/vX.Y.Z`
165+
- **Wrong version tagged**: `git tag -d X.Y.Z && git push origin :refs/tags/X.Y.Z`
166166
then fix and re-tag.
167167
- **Publish workflow failed**: Check the GitHub Actions log. Common causes:
168168
version mismatch, dev suffix present, PyPI trusted publisher not configured.

0 commit comments

Comments
 (0)