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

🐛 Bug: release workflow isn't using JoshuaKGoldberg/release-it-action #1922

Closed
3 tasks done
michaelfaith opened this issue Jan 30, 2025 · 3 comments
Closed
3 tasks done
Labels
type: bug Something isn't working :(

Comments

@michaelfaith
Copy link
Contributor

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Expected

According to the documentation it seemed as though starting a new repo with this template would have the release workflow set up to the point where one could just define the secrets and be off to the races.

Actual

I found that the release workflow was set up with a release-it command that just released a new pre-release version every time, and manually set @JoshuaKGoldberg as the commit author, rather than using the much more featureful JoshuaKGoldberg/release-it-action.

Additional Info

I took your advice and created a new repo to test the release-it config, and discovered this. Here's the PR showing the changes I made in that sample repo https://github.com/michaelfaith/mf-cta-testing/pull/4/files

@michaelfaith michaelfaith added the type: bug Something isn't working :( label Jan 30, 2025
@michaelfaith
Copy link
Contributor Author

Hmm, looking at the code, it looks like this might already have been fixed? FWIW, I used the "use this template" in the github UI to create the new repo, so perhaps it's not using the pre-release version that has the fix?

@JoshuaKGoldberg
Copy link
Owner

Yeah, it's intentional. We're in this awkward in-between where I couldn't figure out beta releases with the action and am pretty confident I'll get this stable soon. #1831 mentions this.

To give a little more context: I want to wait to put CTA@2 as stable until create itself is done with major refactors that will impact CTA. Within create/milestone/2 Broad Launch, that's really:

@JoshuaKGoldberg
Copy link
Owner

FWIW, I used the "use this template" in the github UI to create the new repo, so perhaps it's not using the pre-release version that has the fix?

You bring up a great question:

  • Specifically: how do discrepancies between what's on disk and the template get resolved?
  • Generally: how does "use this template" template forking work in general?

In create, when you run npx create typescript-app@beta or equivalent in a repo, the "hydrate a freshly cloned template instance" flow is:

  1. Check if the repo seems to be that kind of instance: https://github.com/JoshuaKGoldberg/create/blob/33f234433c458290868f6ac7ed17fc22a9a93728/packages/create/src/cli/migrate/runModeMigrate.ts#L85
  2. Delete all contents of the directory and any Git tags: https://github.com/JoshuaKGoldberg/create/blob/33f234433c458290868f6ac7ed17fc22a9a93728/packages/create/src/cli/migrate/runModeMigrate.ts#L93-L94
  3. The templates creations are written/run

...so no files checked into the template repo's Git repository actually impact the output! That's why the release.yml file in this repo being off doesn't show up in created repos when using CTA@2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working :(
Projects
None yet
Development

No branches or pull requests

2 participants