Repository navigation
Take the crate's version from the tag when it is released - #30
Merged
nickyoung-github merged 1 commit intoNov 30, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #29: merge that first, and this then targets master.
The crate's
Cargo.tomlno longer holds a version to be changed by hand before each release. It holds0.0.0, and the release workflow writes the tag's version there:SETUPTOOLS_SCM_PRETEND_VERSION): it would otherwise derive1.3.1.dev0+g….d20261130from the changed tree. It no longer needs the history, so the checkout is shallow.cargo publish --allow-dirty.vX.Y.Z, as a crate's version is semver, whichv1.3.0rc1is not. Neither is released otherwise.The
=1.3.0in the README's dependency line and the examples' comments is still changed by hand.Tested
In a shallow clone tagged
v1.3.0, running the workflow's own commands:uv buildmadedataclass_native-1.3.0.tar.gzanddataclass_native-1.3.0-py3-none-any.whl, each withversion = "1.3.0"in the crate'sCargo.tomland1.3.0in the metadata.cargo publish --dry-run --allow-dirtypackaged and compileddataclass_native v1.3.0.v1.3,v1.3.0rc1,v1.3.0-rc1and1.3.0.The workflow itself runs only on a tag, so its first real run is the 1.3.0 release.