Skip to content

Replace push:tags release trigger with validated workflow_dispatch#1159

Open
tomleb wants to merge 3 commits intorancher:mainfrom
tomleb:validate-release-main
Open

Replace push:tags release trigger with validated workflow_dispatch#1159
tomleb wants to merge 3 commits intorancher:mainfrom
tomleb:validate-release-main

Conversation

@tomleb
Copy link
Copy Markdown
Contributor

@tomleb tomleb commented Apr 27, 2026

Issue rancher/rancher#54790

Replace the on: push: tags: v* trigger with a workflow_dispatch workflow that validates the version before creating the tag and GitHub release.

The validate job:

  • Checks version format (v<major>.<minor>.<patch>[-prerelease])
  • Confirms the version prefix matches the branch's allowed minor (read from VERSION.md on the default branch)
  • Enforces sequential patch ordering within the minor line
  • Confirms the tag does not already exist

The release job (runs after validate):

  • Creates and pushes the annotated tag
  • Creates the GitHub release with auto-generated notes

@tomleb tomleb force-pushed the validate-release-main branch from dc97a82 to dbf6959 Compare April 27, 2026 16:33
Replaces the existing `on: push: tags: v*` trigger with a
`workflow_dispatch` workflow that validates the version before creating
the tag and GitHub release.

The validate job checks version format, confirms the version prefix
matches the branch's allowed minor (read from VERSION.md on the default
branch), enforces sequential patch ordering, and confirms the tag does
not already exist. The release job then creates and pushes the annotated
tag before creating the GitHub release.
@tomleb tomleb force-pushed the validate-release-main branch from dbf6959 to 609ab9e Compare April 27, 2026 16:37
@tomleb tomleb marked this pull request as ready for review April 27, 2026 18:00
@tomleb tomleb requested a review from a team as a code owner April 27, 2026 18:00
tomleb added 2 commits April 27, 2026 14:39
- Use non-capturing group in version regex
- Replace awk with grep/cut/tr for VERSION.md parsing
bash ERE does not support (?:...) — revert to capturing group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant