fix(ci): fix issue with nightly tag latest #4203
Merged
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.
Description
Resolves the issue of goreleaser force push on the nightly tag making the latest tag resolve to
nightly
instead of the latest semver.The
Set CLI_VERSION
step of the nightly release fetches the latest git tag and processes the semver to produce a mirror of what goreleaser is expecting (IE current latest semver + increment the patch integer). This was failing on the initial nightly releases after thenightly
tag was the latest.Example: https://github.com/zarf-dev/zarf/pkgs/container/packages%2Finit/518897335?tag=nightly0.0.1-nightly
This looks to be resolved as of the latest release
v0.62.0
- but determined the problem to be with the latest tag. If we ignore any non-semver tags and preleases then this logic is more deterministic. This will aid other OpenSSF projects that might wish to have an example to pull from for this workflow.Related Issue
Relates to #3928
Checklist before merging