Skip to content

Commit 40ecd44

Browse files
mnriemCopilot
andauthored
chore: use PEP 440 .dev0 versions on main after releases (#2032)
* chore: use PEP 440 .dev0 versions on main after releases - Release-trigger workflow now adds a dev bump commit (X.Y.(Z+1).dev0) on the release branch after tagging, so main gets the dev version when the PR merges. The tag still points at the release commit. - Set current pyproject.toml to 0.4.4.dev0. - Replace broken release workflow badge with shields.io release badge. * Update .github/workflows/release-trigger.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b19a7ee commit 40ecd44

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

.github/workflows/release-trigger.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,40 @@ jobs:
139139
git push origin "${{ steps.version.outputs.tag }}"
140140
echo "Branch ${{ env.branch }} and tag ${{ steps.version.outputs.tag }} pushed"
141141
142+
- name: Bump to dev version
143+
id: dev_version
144+
run: |
145+
IFS='.' read -r MAJOR MINOR PATCH <<< "${{ steps.version.outputs.version }}"
146+
NEXT_DEV="$MAJOR.$MINOR.$((PATCH + 1)).dev0"
147+
echo "dev_version=$NEXT_DEV" >> $GITHUB_OUTPUT
148+
sed -i "s/version = \".*\"/version = \"$NEXT_DEV\"/" pyproject.toml
149+
git add pyproject.toml
150+
if git diff --cached --quiet; then
151+
echo "No dev version changes to commit"
152+
else
153+
git commit -m "chore: begin $NEXT_DEV development"
154+
git push origin "${{ env.branch }}"
155+
echo "Bumped to dev version $NEXT_DEV"
156+
fi
157+
142158
- name: Open pull request
143159
env:
144160
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
145161
run: |
146162
gh pr create \
147163
--base main \
148164
--head "${{ env.branch }}" \
149-
--title "chore: bump version to ${{ steps.version.outputs.version }}" \
150-
--body "Automated version bump to ${{ steps.version.outputs.version }}.
165+
--title "chore: release ${{ steps.version.outputs.version }}, begin ${{ steps.dev_version.outputs.dev_version }} development" \
166+
--body "Automated release of ${{ steps.version.outputs.version }}.
151167
152168
This PR was created by the Release Trigger workflow. The git tag \`${{ steps.version.outputs.tag }}\` has already been pushed and the release artifacts are being built.
153169
154-
Merge this PR to record the version bump and changelog update on \`main\`."
170+
Merging this PR will set \`main\` to \`${{ steps.dev_version.outputs.dev_version }}\` so that development installs are clearly marked as pre-release."
155171
156172
- name: Summary
157173
run: |
158174
echo "✅ Version bumped to ${{ steps.version.outputs.version }}"
159175
echo "✅ Tag ${{ steps.version.outputs.tag }} created and pushed"
176+
echo "✅ Dev version set to ${{ steps.dev_version.outputs.dev_version }}"
160177
echo "✅ PR opened to merge version bump into main"
161178
echo "🚀 Release workflow is building artifacts from the tag"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</p>
1010

1111
<p align="center">
12-
<a href="https://github.com/github/spec-kit/actions/workflows/release.yml"><img src="https://github.com/github/spec-kit/actions/workflows/release.yml/badge.svg" alt="Release"/></a>
12+
<a href="https://github.com/github/spec-kit/releases/latest"><img src="https://img.shields.io/github/v/release/github/spec-kit" alt="Latest Release"/></a>
1313
<a href="https://github.com/github/spec-kit/stargazers"><img src="https://img.shields.io/github/stars/github/spec-kit?style=social" alt="GitHub stars"/></a>
1414
<a href="https://github.com/github/spec-kit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/github/spec-kit" alt="License"/></a>
1515
<a href="https://github.github.io/spec-kit/"><img src="https://img.shields.io/badge/docs-GitHub_Pages-blue" alt="Documentation"/></a>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "specify-cli"
3-
version = "0.4.3"
3+
version = "0.4.4.dev0"
44
description = "Specify CLI, part of GitHub Spec Kit. A tool to bootstrap your projects for Spec-Driven Development (SDD)."
55
requires-python = ">=3.11"
66
dependencies = [

0 commit comments

Comments
 (0)