Skip to content

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

Merged
Kobzol merged 2 commits into
rust-lang:mainfrom
Kobzol:ci-release
Jun 12, 2025
Merged

Add a CI workflow to publish new releases after a tag is pushed#71
Kobzol merged 2 commits into
rust-lang:mainfrom
Kobzol:ci-release

Conversation

@Kobzol

@Kobzol Kobzol commented May 29, 2024

Copy link
Copy Markdown
Member

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

Kobzol commented Jul 22, 2024

Copy link
Copy Markdown
Member Author

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

@jdno

jdno commented Aug 14, 2024

Copy link
Copy Markdown
Member

CARGO_REGISTRY_TOKEN has been added. 👍

@oli-obk

oli-obk commented Jun 11, 2025

Copy link
Copy Markdown
Contributor

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

@Kobzol

Kobzol commented Jun 11, 2025

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Contributor

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

@Kobzol

Kobzol commented Jun 11, 2025

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

Kobzol commented Jun 12, 2025

Copy link
Copy Markdown
Member Author

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

Kobzol commented Jun 12, 2025

Copy link
Copy Markdown
Member Author

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

Kobzol commented Jun 12, 2025

Copy link
Copy Markdown
Member Author

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

marcoieni commented Jun 12, 2025

Copy link
Copy Markdown
Member

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