add publication workflow using cargo workspaces #160
Closed
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.
resuming from PR #143, here is a proposal to handle publishing via
cargo workspaces
requirements
cargo login
token configured in github as a secret namedCRATES_IO_TOKEN
proposed release steps
master
branch for the releaserelease
branch to be aligned withmaster
release
branch, including a line that ends with "new version <version>
" in the commit message (see example below)what the workflow will do
release
branch0.2.0-rc.2
in the example)=
symbol)v
(e.g.v0.2.0-rc.2
)crates.io
(using the token provided via github secrets)master
branchother considerations
rel0.2.0-rc.2
) but it didn't work since a tag-triggered workflow can't push a new tag (e.g.v0.2.0-rc.2
), as it's forbidden by github (to avoid workflow loops AFAIK)<package> = { path = "<path>", version = "=<version>" }
to avoidcargo ws version
errors onlnpbp_derive
of the kindfailed to select a version for the requirement
cargo ws version
command produces some other errors of the same kind (see example below) but I left those as they are for now, since they appear related to the tokio/socket2 dependency issue (weren't there some days ago) and don't makecargo ws version
orcargo ws publish
failexamples
commit message:
cargo ws version
error:conclusions
there surely are many improvements than can be done, like more and stricter checks to avoid release issues, but it should be a good starting point
let's discuss and optionally wait for a fix to #159 (and then document the final release procedure before merging)