Repository navigation
Add a manual release workflow - #21
Merged
Merged
Conversation
release.yml is started from the Actions tab (or `gh workflow run release.yml -f version=X.Y.Z`) on main. It: - validates the version (X.Y.Z, optionally aN/bN/rcN, no 'v' prefix) and that the tag does not exist yet - sets __version__ in ipython_pygments_lexers/__init__.py - commits "Version number -> X.Y.Z" as github-actions[bot] and adds an annotated X.Y.Z tag, matching the existing conventions - pushes main and the tag atomically - starts publish.yml on the new tag Pushes made with GITHUB_TOKEN do not trigger other workflows, so the tag push alone would not start publish.yml. workflow_dispatch is the exception, so publish.yml gains a workflow_dispatch trigger. Both its jobs only run on tag refs, and the tag/__version__ check plus the pypi environment's tag rule still apply, so dispatching it on a branch cannot publish. If main is protected against direct pushes, GitHub Actions must be allowed to bypass that rule for this to work. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
release.yml is started from the Actions tab (or
gh workflow run release.yml -f version=X.Y.Z) on main. It:Pushes made with GITHUB_TOKEN do not trigger other workflows, so the tag push alone would not start publish.yml. workflow_dispatch is the exception, so publish.yml gains a workflow_dispatch trigger. Both its jobs only run on tag refs, and the tag/version check plus the pypi environment's tag rule still apply, so dispatching it on a branch cannot publish.
If main is protected against direct pushes, GitHub Actions must be allowed to bypass that rule for this to work.