rbxcloud
rbxcloud copied to clipboard
Confirm Cargo Version matches Tag Version in release CI/CD workflow
Resolves #3
Done:
- Find the cargo version from the
Cargo.tomlfile. - Add a
vto the version within the workflow. - Cancel the workflow if the two do not match up.
Todo:
- Figure out why
github.refis not returning the current tag. - Complete the semi-automation of releases in the CI workflow.
If I can figure out why I cannot get the tag using github.ref, everything else should be pretty much done from there.
Thanks!
P.S. I'll squash the commits if that's easier for you - was annoying to test the workflows out without commiting! :joy:
Thanks for the work on this! I'll test this out later and then merge it in.
Thanks for the work on this! I'll test this out later and then merge it in.
Just to clarify - this is still a draft pr. I've been struggling to get the tag name from the CI. I tried with github.ref and it did not work as intended.
If it helps, this is how I do it in my other project: https://github.com/Sleitnick/Knit/blob/main/.github/workflows/release.yaml#L48
${GITHUB_REF#refs/tags/}
So maybe it could look something like this?
- name: Get the tag of current release
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Verify package version is equal to tag version
if: ${{ steps.cargo_version.outputs.value != steps.get_version.outputs.VERSION }}
run: |
echo "${{ steps.cargo_version.outputs.value }}"
echo "${{ steps.get_version.outputs.VERSION }}"
exit 1
If you wanna make those changes, I'll pull this in!
Hey sorry about that @Sleitnick will get to it ASAP!
No problem; no rush
Hm @Sleitnick... I still could not get it implemented with the changes you requests, you should be able to add a commit re if you want to take a stab at seeing what's wrong here.