ci: adopt release-please for release workflow#294
ci: adopt release-please for release workflow#294michaelfaith wants to merge 12 commits intoeslint-community:mainfrom
release-please for release workflow#294Conversation
This change breaks releases out to its own workflow and switches from semantic releases to `release-please`. This is consistent with `eslint-plugin-eslint-plugin`, and will allow for more strategic release workflows. Rather than every change being released immediately, release please will create a release please PR, based on the nature of the commits that haven't been released before. It uses the same conventional commit commit format, so there's no need to change any existing conventions. Release please will manage if the release pr should be major, minor, or patch, based on the list of unreleased commits. At the point where you're ready to move forward with the release, you just have to merge the release PR, and release please will handle creating the GH release, updating the CHANGELOG and creating the repo tag. The workflow will then run the build and npm publish when a release was successfully created. > [!IMPORTANT] > In order for this work to be complete the following will need to be done by a maintainer: > > - Update NPM Trusted Publishing configuration to point to `release.yml` instead of `ci.yml` > - Create a PAT for Release Please to use and add it as a repo secret, so that downstream workflows will be triggered successfully (https://github.com/googleapis/release-please-action?tab=readme-ov-file#other-actions-on-release-please-prs) - Name: `RELEASE_PLEASE_TOKEN`) After merging this PR, the `alpha` branch should be merged into `main`, which will create the new major version release PR. But make sure it is *not* a squash merge, or else the commits won't be preserved for the changelog.
b6a69d9 to
501ab14
Compare
|
Example of release PR in one of the repos that I migrated last week: michaelfaith/eslint-plugin-package-json#1482 Successful release: https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/releases/tag/v0.87.1 PR that made it happen: michaelfaith/eslint-plugin-package-json#1478 |
|
Another note: the semantic release flow used the same format for repo tags as release-please, so that'll "just work" the same as before, and users won't notice any difference in that regard. I just noticed there's not a CHANGELOG in the repo, so I guess it won't do anything there. Is that something that you'd want to change? Would you want to add a CHANGELOG.md? This would do the changelog updates if there was one. |
@michaelfaith Looking at
That shouldn't be a problem
Again looking at Looking at other @eslint-community repos that are using
This PR also isn't using a PAT, so I guess we can get rid of using the PAT as well?
That shouldn't be a problem either
Releases will still have the same info as they currently have, I suppose? |
There was a problem hiding this comment.
Pull request overview
This PR migrates the release workflow from semantic-release to release-please, enabling more strategic control over releases through pull requests. Instead of automatic releases on every push, release-please creates a release PR that aggregates unreleased commits and determines the appropriate version bump (major, minor, or patch) based on conventional commit messages.
Key changes:
- Adoption of release-please for managing releases via PRs
- Separation of release logic into a dedicated workflow triggered only on the main branch
- Creation of a reusable composite action for common setup tasks (checkout, Node.js setup, dependency installation)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
release-please-config.json |
Configures release-please with changelog sections and release type |
.release-please-manifest.json |
Tracks the current version (4.9.1) for release-please |
package.json |
Updates version from semantic-release placeholder to actual version 4.9.1 |
.github/workflows/release.yml |
New workflow for release-please execution and npm publishing |
.github/workflows/post-release.yml |
New workflow to comment on issues/PRs when included in a release |
.github/workflows/ci.yml |
Removes release job and refactors to use reusable setup action |
.github/workflows/GHPages.yml |
Refactors to use reusable setup action |
.github/actions/setup/action.yml |
New composite action consolidating checkout, Node setup, and npm install |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Yeeeah, I've been meaning to address that. I just meant that release-please as a tool is consistent, not that our implementation is necessarily consistent. They didn't do the v3 -> v4 update properly. The variables they have declared in the workflow were moved to a config file (https://github.com/googleapis/release-please-action?tab=readme-ov-file#upgrading-from-v3-to-v4). If you look in their release workflow, it's complaining about those variables not existing anymore (https://github.com/eslint-community/eslint-plugin-eslint-plugin/actions/runs/19239812037/job/54999370466)
I had to add it in a follow-up PR here: michaelfaith/eslint-plugin-package-json#1486
I'm not sure how the eslint-community repos are getting by without it, unless they're just not running CI on the release PRs?
They will 👍 |
|
Btw, i would love to not have to use a PAT, so i'm totally OK with removing it. But i suspect that if we do that, that ci won't run on those PRs.(at which case you could just add it separately like i did). What do you think? |
|
Another data point from a different repo: https://github.com/yargs/yargs/blob/main/.github/workflows/release-please.yml |
|
The copilot feedback is valid. I'll need to adjust that action. I'll have to do that tomorrow (along with any adjustments you'd like) |
|
@michaelfaith I think the main "problem" here is needing the PAT as we finally got rid of any tokens needed in all our repos since we're using trusted publishing, so I'm not a fan of introducing any tokens again if we really don't need them. If you could have a look at the other @eslint-community repos and try to figure out why it's not necessary there, we could bring this PR in line with that. I'm fine with having the separate files for config, as that's what we have with |
It looks like they're just not running CI on release PRs. I think that's a valid approach, but I'd don't have visibility to their repo settings to see what they have defined for that. So that might be something you'd have to configure, and then I should be able to pull the token? |
|
Removed the token and adjusted the action from copilot's feedback |
|
I think we could actually get the best of both worlds. I looked a bit more into how |
|
@michaelfaith I don't think I fully understand what you're talking about tbh Can you please explain a bit more in detail the workflow you're mentioning above? |
For sure, let me explain it all from the top, since I'm not sure that I've done a good job of explaining it little by little as I've figured it out. So, the repos I work with Josh on and
Additionally, any actions (including creating PRs) that are performed by a bot using the default So, the combination of those two things creates a problem for PRs created by
The required steps are in this limbo pending state, because CI was never triggered.
The
So, the fact that CI doesn't trigger doesn't matter for them, because the repo doesn't need any of those steps to run for the PR to merge. This repo also doesn't appear to have any required steps, so what I have in the PR now will work the same way that the eslint-community repos do today. However, if you do want to run CI before merging the release PR, which I'd recommend (mainly just to do a sanity check), then I could tweak the triggers in the same way so that you could just add a |
|
@michaelfaith I think I understand it now. Let's keep it without the I would however like to hear @eslint-community/core-team @eslint-community/eslint-plugin-eslint-plugin, @eslint-community/eslint-plugin-node, @eslint-community/eslint-plugin-promise & @eslint-community/eslint-plugin-security if they would want to have this. |
|
@MichaelDeBoey I believe that should be everything. Let me know if there's anything else. |
|
@michaelfaith This got me wondering: with How would we create alpha/beta releases with |
release-please for release workflow
I don't really have that set up here. But if you want to do that, there are a couple ways you can achieve it, depending on how complex you want to get. The easiest way to do it, would be to merge the "prerelease": true,
"prerelease-type": "alpha", // or beta, or next, etcThat'll pick up where you left off with the alpha series. If you want something more complex, where you're still running the So, I'd recommend just keeping it simple, and at whatever point you're ready to switch |
|
@michaelfaith It's just the fact that right now people can already use this package while we're still working on v5 by using our alpha release This way they could test things out and maybe even find bugs that we can still fix before cutting an actual v5 release In my experience, this isn't a problem most of the times, but sometimes a bug has major consequences in how things work, so you could have a situation where you need to cut another major release a few days later But most important reasoning why I think we could benefit from being able to do alpha/beta releases is that you could still keep pushing to |
I understand the value. I don't think it's always necessary, but I understand it. But I'm just trying to get a sense of the urgency. v5 has been in alpha for over a year now; is it going to just continue to be in alpha for another year? I got the sense from previous conversations that you were wanting to get to a release state quickly, so you could have at least a little space before doing the next major when |








This change breaks releases out to its own workflow and switches from semantic releases to
release-please.This is consistent with
eslint-plugin-eslint-plugin, and will allow for more strategic release workflows. Rather than every change being released immediately, release please will create a release please PR, based on the nature of the commits that haven't been released before. It uses the same conventional commit commit format, so there's no need to change any existing conventions. Release please will manage if the release pr should be major, minor, or patch, based on the list of unreleased commits. At the point where you're ready to move forward with the release, you just have to merge the release PR, and release please will handle creating the GH release, updating the CHANGELOG and creating the repo tag. The workflow will then run the build and npm publish when a release was successfully created.Important
In order for this work to be complete the following will need to be done by a maintainer:
release.ymlinstead ofci.ymlRELEASE_PLEASE_TOKEN)After merging this PR, the
alphabranch should be merged intomain, which will create the new major version release PR. But make sure it is not a squash merge, or else the commits won't be preserved for the changelog.Closes #273
Closes #236