Skip to content

Add a CI workflow to publish new releases after a tag is pushed #71

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

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented May 29, 2024

Context: rust-lang/infra-team#117

This repo has write access by t-compiler and t-compiler-contributors, and currently this workflow creates a release after a push of a tag or manually through workflow_dispatch. If we don't want to give right to publish to t-compiler-contributors, then we can remove the workflow_dispatch trigger, and create a branch protection to e.g. v-* tags that would only allow t-compiler to push.

Requires a new secret CARGO_REGISTRY_TOKEN to be added to the secrets of this repository, which has scoped access to publish rustc-demangle.

@Kobzol
Copy link
Contributor Author

Kobzol commented Jul 22, 2024

CC @jdno, could you please also add the token here? Thanks!

@jdno
Copy link
Member

jdno commented Aug 14, 2024

CARGO_REGISTRY_TOKEN has been added. 👍

@oli-obk
Copy link

oli-obk commented Jun 11, 2025

This needs a rebase, but I think it's ready otherwise now that the token is there?

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 11, 2025

Oh. Hello! 😆 Yeah, I think we can merge this. We won't know if it works until we push a tag anyway. Rebased.

@tgross35
Copy link
Contributor

No release-plz for the automatic tags and release PRs? 🙂

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 11, 2025

Would you say this crate is released often enough that it is worth it? But if we can just copy CI config from another repo and it will "just work", then sure, why not :)

@tgross35
Copy link
Contributor

Would you say this crate is released often enough that it is worth it?

Not really, but also not for many of the crates I've added it to 😆 It's just kind of convenient that you don't need to touch the repo locally to do a release.

I've used this config almost everywhere though, if you want to pick it up https://github.com/rust-lang/cfg-if/blob/dbfd66354537a7d47d84c95ea28b9a6f169ba9d1/.github/workflows/publish.yaml

@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 12, 2025

Yeah, seems better than messing with tags locally. Changed to release-plz.

@Kobzol Kobzol requested a review from marcoieni June 12, 2025 11:09
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 12, 2025

Let's try it.

@Kobzol Kobzol merged commit 6de8895 into rust-lang:main Jun 12, 2025
6 checks passed
@Kobzol Kobzol deleted the ci-release branch June 12, 2025 13:17
@Kobzol
Copy link
Contributor Author

Kobzol commented Jun 12, 2025

Hmm, it failed (https://github.com/rust-lang/rustc-demangle/actions/runs/15611624336/job/43973685924), because it tried to publish the native-c package. Is that also supposed to be published or should we ignore it?

@marcoieni
Copy link
Member

marcoieni commented Jun 12, 2025

it's not published on crates.io

If the maintainers don't want to publish it, you can set publish = false in https://github.com/rust-lang/rustc-demangle/blob/main/crates/native-c/Cargo.toml
Release-plz will ignore it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants