Add workflow to auto-update PrintVersion on release branch creation#1068
Add workflow to auto-update PrintVersion on release branch creation#1068bnbarham merged 1 commit intoswiftlang:mainfrom
Conversation
bnbarham
left a comment
There was a problem hiding this comment.
Ooo, interesting idea! We do still bump without branch creation, but this would at least catch some of them.
Thoughts @shahmishal?
| --body "This PR updates the version in PrintVersion.swift to ${{ env.VERSION }}. | ||
|
|
||
| Automatically created when release branch ${{ env.RELEASE_BRANCH }} was created." \ |
There was a problem hiding this comment.
How about the following:
This PR was automatically opened by a GitHub action on creation of a release branch (${{ env.RELEASE_BRANCH }}). Review the version update and merge if correct, otherwise update the version manually.
?
There was a problem hiding this comment.
Yes, I’ve updated it. Thank you!
dd655d6 to
5d7e295
Compare
5d7e295 to
3e6a24d
Compare
|
Ah, so in cases like 6.1.2 and 6.1.3, they were released with just tags and no branch 🫨 |
Indeed 😅 I still think this is better than what we currently have - at least we can't miss major version bumps. The Windows failures are fixed by swiftlang/swift-markdown#245, but it hasn't been merged yet. |
|
Thanks @TTOzzi! |
| on: | ||
| create: | ||
| branches: | ||
| - "release/*" |
There was a problem hiding this comment.
@TTOzzi It seems that this is wrong.
It was triggered on a non-release branch.
- [undo-sha-pinning] Update version to undo-sha-pinning kkebo/swift-format#555
- https://github.com/kkebo/swift-format/actions/runs/18427728560
The following discussion looks related:
There was a problem hiding this comment.
Oh, I hadn’t noticed that 😮 thank you for catching it! I’ll take a look right away.
This retries the work attempted in #975 and #1029.
When a release branch is created, this workflow automatically updates the version output value in PrintVersion.swift to match the release version, commits the change, and opens a PR.
If committing directly to the release branch is acceptable, that would be cleaner. Please let me know your thoughts, and I’ll adjust the workflow accordingly.