Skip to content

Conversation

@courier-new
Copy link
Contributor

(Hopefully) closes #878.

We'll now use the GitHub-provided environment variable GITHUB_REF_NAME to determine the current (most recent) tag, rather than the unreliable sort. According to the docs, this value will be:

The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, feature-branch-1.

I was able to test this locally with act (thanks Bolaji!!) using simulated tag push events. I tested that a new tag triggered the "new latest" version of the workflow and that an older patch version tag triggered the patch version. As a caveat, since I could only test with a simulated event, we of course can't guarantee that a real GitHub event wouldn't behave differently. But I have higher confidence, at least.

I also tried to clarify a couple comments, mostly because after staring at the words "latest" and "current" and "most recent" for a couple days, they all started to blur together in my mind. 🤪

Test plan

I'll take point on our 4.2 release (or any sooner patch, if it comes up) later this month to verify the workflow succeeds.

@courier-new courier-new requested a review from a team November 4, 2022 00:17
@courier-new courier-new self-assigned this Nov 4, 2022
@courier-new courier-new changed the title Use GITHUB_REF_NAME to determine current (most recent) tag Use GITHUB_REF_NAME to determine current tag for release workflow Nov 4, 2022
Copy link
Member

@eseliger eseliger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you that this makes sense, my bash knowledge is about the same of a 2 year old 😬

@courier-new courier-new enabled auto-merge (squash) November 7, 2022 05:17
@courier-new courier-new merged commit 993ee0a into main Nov 7, 2022
@courier-new courier-new deleted the kr/current-version-determination branch November 7, 2022 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

src-cli: fix latest version release detection

4 participants