-
Notifications
You must be signed in to change notification settings - Fork 9
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
Confirm Cargo Version matches Tag Version in release CI/CD workflow #4
base: main
Are you sure you want to change the base?
Conversation
P.S. I'll squash the commits if that's easier for you - was annoying to test the workflows out without commiting! 😂 |
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 |
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 |
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. |
Resolves #3
Done:
Cargo.toml
file.v
to the version within the workflow.Todo:
github.ref
is not returning the current tag.If I can figure out why I cannot get the tag using
github.ref
, everything else should be pretty much done from there.Thanks!