japaric / trust

Travis CI and AppVeyor template to test your Rust crate on 5 architectures and publish binary releases of it for Linux, macOS and Windows
Apache License 2.0
1.26k stars 59 forks source link

cargo publishing #50

Closed fenollp closed 7 years ago

fenollp commented 7 years ago

It'd be nice to also have the crate pushed to crates.io, on tagged commits, after tests passed.

Seems rather easy to implement: https://github.com/tomaka/glutin/blob/a974631197da6da9d9a91b00b4bfc75345608e51/.travis.yml#L31

japaric commented 7 years ago

I'm not 100% sure about this. In the past, I had commited what would have been e.g. v0.1.1 and tried to cargo publish that but it failed due to metadata issues (e.g. too many keywords). Had I pushed that tag to let CI handle it, CI would have failed to publish it too and I would have ended with a GitHub tag but no published crate ...

That's why I always do my releases like this:

$ git commit -m 'release v0.1.1`
$ cargo publish  # if this fails, fix the problem and amend the last commit
$ git tag -a v0.1.1  # we are sure that a crate was published!
$ git push
$ git push origin v0.1.1
fenollp commented 7 years ago

Works for me :)