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

crates.io provider for publishing Rust packages #826

Merged
merged 1 commit into from Oct 23, 2018

Conversation

Projects
None yet
3 participants
@Nemo157
Contributor

Nemo157 commented Jun 19, 2018

Example job: https://travis-ci.com/Nemo157/nemo157-rs/jobs/130213124

This is a trivial first integration. It would be possible to add more options like which registry to push to, but those can be left to a future PR.

@Nemo157 Nemo157 referenced this pull request Jun 19, 2018

Open

Publishing in CI #16

@Nemo157

This comment has been minimized.

Contributor

Nemo157 commented Jun 19, 2018

New example job given I rebased a change into the first commit: https://travis-ci.com/Nemo157/nemo157-rs/jobs/130230928

@Nemo157

This comment has been minimized.

Contributor

Nemo157 commented Jun 19, 2018

I actually wonder if this provider should be called cargo since crates.io is only one instance of a Rust package registry, @carols10cents might you have an opinion on this?

@carols10cents

This comment has been minimized.

carols10cents commented Jun 20, 2018

@Nemo157 Sorry, I don't have any context here-- what is dpl? What does "provider" mean in the context of dpl?

@Nemo157

This comment has been minimized.

Contributor

Nemo157 commented Jun 20, 2018

@carols10cents, sorry, I probably should have mentioned that. dpl is used for the deploy providers for Travis.CI, adding this provider will allow you to add something like

deploy:
  provider: cratesio
  token: <encrypted API token>

To your .travis.yml and have it publish the crate to crates.io. As an example this is very close to the existing npm provider.

What I’m wondering about is the name used for the provider, should this be crates.io specific since it’s the canonical registry, or should it be something more general in case it’s pointed at an alternative registry.

@carols10cents

This comment has been minimized.

carols10cents commented Jun 26, 2018

Hm, so there would be additional config if publishing to an alt registry? In that case, i think the provider should be cargo.

end
def check_auth
option(:token)

This comment has been minimized.

@BanzaiMan

BanzaiMan Sep 13, 2018

Member

Is there a way to check with cargo if the provided token is valid? If so, it is best to do it here, so that the problem is detected early.

This comment has been minimized.

@Nemo157

Nemo157 Sep 14, 2018

Contributor

Not currently, I might open an issue and see about adding a command for it to cargo.

@BanzaiMan

This comment has been minimized.

Member

BanzaiMan commented Sep 13, 2018

Thanks for the PR. Could you test again, with the new name?

@Nemo157

This comment has been minimized.

Contributor

Nemo157 commented Sep 15, 2018

@BanzaiMan

This comment has been minimized.

Member

BanzaiMan commented Sep 15, 2018

That's using 1.9.6 code base (https://travis-ci.com/Nemo157/nemo157-rs/jobs/135448496#L594), which I believe was what the June code base was. I do not anticipate any significant problem, but please update your branch and try again. (It should use 1.10.0, which would yield 1.10.1 as the version number for your deployment.)

@Nemo157

This comment has been minimized.

Contributor

Nemo157 commented Sep 15, 2018

Rebased and new job should be running soon: https://travis-ci.com/Nemo157/nemo157-rs/jobs/145942198

@BanzaiMan BanzaiMan merged commit cd5eb44 into travis-ci:master Oct 23, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@BanzaiMan

This comment has been minimized.

Member

BanzaiMan commented Oct 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment