thrift icon indicating copy to clipboard operation
thrift copied to clipboard

ci(rust): Add release workflow for rust

Open Xuanwo opened this issue 1 year ago • 3 comments

This PR adds release workflow for rust which will do cargo publish while tagged.

  • [ ] Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • [x] Did you squash your changes to a single commit? (not required, but preferred)
  • [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • [ ] If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

Xuanwo avatar Aug 21 '24 01:08 Xuanwo

cc @Jens-G, Would you like to take a look, thanks!

To make this workflow work, we also need to set a new secret call CARGO_REGISTRY_TOKEN.

Xuanwo avatar Aug 21 '24 01:08 Xuanwo

LGTM but I have not really too much expertise with Rust, so a second pair of eyes is more than appreciated.

Jens-G avatar Aug 22 '24 11:08 Jens-G

LGTM but I have not really too much expertise with Rust, so a second pair of eyes is more than appreciated.

Hi, @Jens-G, it seems no one else has reviewed this yet. However, this workflow has been successfully used in many other projects. For example:

  • opendal: https://github.com/apache/opendal/blob/main/.github/workflows/release_rust.yml
  • iceberg-rust: https://github.com/apache/iceberg-rust/blob/main/.github/workflows/publish.yml#L46

Would this be valuable for your review?

Xuanwo avatar Aug 28 '24 07:08 Xuanwo

this CARGO_REGISTRY_TOKEN needs to be added to GitHub repo itself right? i as a committer would not be able to do that, it requires some admin role in the repo itself.

jimexist avatar Aug 28 '24 14:08 jimexist

this CARGO_REGISTRY_TOKEN needs to be added to GitHub repo itself right? i as a committer would not be able to do that, it requires some admin role in the repo itself.

Yes. We will need one of our PMC members to contact with the INFRA team to get it setup.

Xuanwo avatar Aug 28 '24 15:08 Xuanwo

We can take those tickets as examples:

  • https://issues.apache.org/jira/projects/INFRA/issues/INFRA-25132
  • https://issues.apache.org/jira/browse/INFRA-25951

Xuanwo avatar Aug 30 '24 07:08 Xuanwo

https://issues.apache.org/jira/browse/INFRA-26083

Jens-G avatar Aug 31 '24 22:08 Jens-G

issues.apache.org/jira/browse/INFRA-26083

Thank you, @Jens-G, for this!

Xuanwo avatar Sep 01 '24 09:09 Xuanwo

INFRA has added the token.

Jens-G avatar Sep 07 '24 11:09 Jens-G

INFRA has added the token.

Thanks!

Xuanwo avatar Sep 07 '24 11:09 Xuanwo