-
Notifications
You must be signed in to change notification settings - Fork 249
chore: automatically push tags when version is incremented #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This also has the nice side-effect that we can't have two tags on the same commit, which simplifies build tooling that needs "the tag" for a commit.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: justinsb The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @justinsb ! automating tags instead of handling them manually is definitely the right move - i'm fine starting with shared versioning across components for now and evolving the approach as we learn what we need.
left a few comments below
| VERSION=$(grep 'var Version\s*=' version.go | awk '{print $4}' | sed -e 's_"__g') | ||
|
|
||
| if [[ ! "${VERSION}" =~ ^([0-9]+[.][0-9]+)[.]([0-9]+)(-(alpha|beta)[.]([0-9]+))?$ ]]; then | ||
| echo "Version ${VERSION} must be 'X.Y.Z', 'X.Y.Z-alpha.N', or 'X.Y.Z-beta.N'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we allow -rc.N?
|
|
||
| jobs: | ||
| tag-release: | ||
| if: ${{ github.repository == 'kubernetes-sigs/kro' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're planning to eventually release controller, cli, and other tools. do we want to make this "controller" specific?
| MINOR=${BASH_REMATCH[1]} | ||
| RELEASE_BRANCH="release-${MINOR}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MINOR=${BASH_REMATCH[1]} | |
| RELEASE_BRANCH="release-${MINOR}" |
| on: | ||
| push: | ||
| branches: | ||
| - master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - master | |
| - main |
This also has the nice side-effect that we can't have two
tags on the same commit, which simplifies build tooling
that needs "the tag" for a commit.