-
Notifications
You must be signed in to change notification settings - Fork 65
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
Compatible with "version update" pushes? #27
Comments
That’s what I did originally but found it too noisy, every commit has another commit after it and those lose their signaling value once you are releasing every commit to master. |
What would you recommend with this workflow if you needed to keep two "branches" up to date at once? In that case you wouldn't be able to always bump from the "latest" version. |
You know, I thought these release commits were really important before I was releasing every merge but now I can’t say I see the importance. Also, the git tag does have the package.json version updated properly, so you have a complete reference in git it just isn’t in master. |
That’s a tough one. First of all, you should be able to setup the releases to run from any branch. The action can be triggered for any branch, if we have code somewhere that assumes You could trigger the action in multiple branches, but you’d have some problems. The strategy for this project is to treat the registry as the source of truth for the “latest” release and that has a one-to-one relationship with the branch you release from. I don’t know how you would coordinate releases from multiple branches on the same npm package since each branch would assume the latest npm release is for their branch, but if you changed the package.json name in each branch it should work just fine. |
Thanks for all the thoughts... it's probably OK if this particular approach isn't for every project. It seems like it would be cool if you could indicate your version range in package.json, for example, in the scenario where // in master:
"version": "x.x.x"
// in stable/v4:
"version": "4.x.x" If I think you could write this, but whether it's worth seeing "npm WARN Invalid version" errors every time you run npm is debatable. |
Interesting approach, I kind of like it. Having a non-compliant version in package.json means you can’t accidentally get this behavior. I’d take a PR for this. But just a warning if you’re going to work on it, testing this is going to be a lot of work ;) I still haven’t found a reasonable way to test GitHub Actions without just doing a lot of pushes. |
just a comment on sort-of this topic - i am running into this problem now where I am using this action to bump/tag the release, but then a different action to make a "github release" that uses the github api. all thats missing to make the github release is to know the version number (tag number) to release. i've found other actions that can do this by reading the i think a reasonable solution that would solve both of your problems (and mine) is that this action could return the new version number as a variable for other steps in the workflow to use. that way, this action is not by default annoyingly committing to main but an end user could chose to do that themselves using another action. |
Is it possible to use this workflow, but also get package.json updates? (so that the version released is reflected in the master branch's package.json).
The text was updated successfully, but these errors were encountered: