Skip to content
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

Add automation to release new crates #374

Merged
merged 4 commits into from
May 1, 2024
Merged

Add automation to release new crates #374

merged 4 commits into from
May 1, 2024

Conversation

gjtorikian
Copy link
Collaborator

👋 This is an automation to make cutting new releases a little easier. It's a variation on a workflow I use in my Ruby gem releases.

Note that this release workflow only executes manually, ie. you have to still push the Release workflow button:

Screenshot 2024-04-09 at 07 53 58

Step by step, it:

  1. Grabs the repo, sets up rust
  2. Gets the current version of the project defined in Cargo.toml
  3. Generates a changelog/readme
  4. Pushes those to the repo
  5. Publishes the crate
  6. Creates a tag, and publishes the release on GitHub

Along the way, I also see the opportunity to add more automations around dependency management.

I haven't tested this yet, but I will do so by changing the version number to something like 0.$LATEST.0.alpha if the PR is desired!

Copy link
Contributor

github-actions bot commented Apr 9, 2024

Command Mean [ms] Min [ms] Max [ms] Relative
./bench.sh ./comrak-34b110b 323.8 ± 1.8 321.0 328.1 2.82 ± 0.08
./bench.sh ./comrak-main 322.4 ± 1.7 319.9 326.4 2.80 ± 0.08
./bench.sh ./pulldown-cmark 115.0 ± 3.1 112.8 127.8 1.00
./bench.sh ./cmark-gfm 119.1 ± 3.1 116.7 130.0 1.04 ± 0.04
./bench.sh ./markdown-it 481.0 ± 2.7 475.6 487.5 4.18 ± 0.12

Run on Tue Apr 9 12:00:33 UTC 2024

@kivikakk
Copy link
Owner

This looks lovely! It'd be great to see a test run.

Also, looks like there's still some Rubygems stuff in the publish job?

@gjtorikian
Copy link
Collaborator Author

It'd be great to see a test run.

I swear this isn't a social engineering phishing attempt! 😅 But I just realized I don't have the ability to add secret tokens to this repo, so I can't add my own crates.io API key to use here—so it won't ever publish.

If you could add CRATES_IO_TOKEN as a secret variable, I can move forward with testing the run!

@kivikakk
Copy link
Owner

😅 Done!

@gjtorikian
Copy link
Collaborator Author

Sigh. Looks like you can't manually run a workflow—even if it's set to workflow_dispatch—until it's merged in the main branch.

In theory, I think all of this ought to work. Happy to make changes, and then once it's merged, actually attempt the automation? I'm not sure how else to test this.

@kivikakk
Copy link
Owner

kivikakk commented May 1, 2024

Of course, please go ahead!

@gjtorikian gjtorikian merged commit 924eaa8 into main May 1, 2024
24 checks passed
@gjtorikian gjtorikian deleted the automation branch May 1, 2024 19:35
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.

2 participants