release-script
release-script copied to clipboard
Please add option to only commit, no release and release only
I see situation a alpha. should only. be own git, so I would like to choose if my run should only end on git, or also on NPM
In addition, if the version is already. on git but not NPM, an option to only "release" would be great too
So basically you want to skip the version bump? For the automatic release it would still require tagging the current commit, so there must not already be a tag with that version.
Or do you still want to bump the version but skip the npm release? In the current workflow, all git tags are released on npm. Alpha version should have a prerelease suffix like v1.2.3-alpha.0.
The build action would release those too: https://github.com/ioBroker/create-adapter/blob/master/templates/_github/workflows/test-and-release.yml.ts#L28-L29 so it would be up to you to decide if you want these two lines active or not.
hmm than it can make sense to have an alpha option ? alpha meaning : only git push with tag, patch/minor/major than additional to publish npm
if you use minor as example it will run all, if I use alpha its only using the routines up to git. If I use patch/minor/major after that it sees an version on git but not NPM and handles thee publish
i likes to test alpha before releasing on NPM as on NPM al beta teste see the new version which leads in indeed issues
Like I said, comment out the two lines in your Github Actions workflow so the release step doesn't trigger. Then you can use the pre-versions to push the release on github without releasing on npm:
npm run release preminor alpha- Bumps e.g.1.0.0to1.1.0-alpha.0npm run release premajor beta- Bumps e.g.1.0.0to2.0.0-beta.0npm run release prerelease- Bumps a prerelease version, e.g.1.1.0-alpha.0to1.1.0-alpha.1and so on.
I think this issue should rather be adding good documentation instead of a new feature :) Well, maybe merging multiple prerelease changelogs into a final one.
I think this issue should rather be adding good documentation instead of a new feature :)
agree, as I explained the used case is having an alpha not on latest repo so based on documentation of way of handling the Flow this could be accomplished
i fixed this by basically only having the release script running when I publish anything to the main branch, I would suggest to add this as a best practice ?
https://github.com/DrozmotiX/ioBroker.esphome/blob/main/.github/workflows/test-and-release.yml#L8
I don't see how that solves the problem though. If you push a tag, the action will run for that tag too. And by limiting the workflow to the main branch, your tests won't run for the branch.
If you want to selectively disable parts of the release, it needs to be checked in the steps of the release job: https://github.com/DrozmotiX/ioBroker.esphome/blob/main/.github/workflows/test-and-release.yml#L103
If you want to selectively disable parts of the release, it needs to be checked in the steps of the release job:
agree, good point.... anyway, I guess he issue can be closed by adding this to the documentation or having his issue as explanation ?
We could add the explanation as comments into the template.
@AlCalzone To which two lines in the template are you referring to? The template seems to have changed since you wrote your comment. Which lines should I comment out if I do not want to have pre-versions published on NPM but only patch/minor/major?
@pdbjjens The one near the start of the workflow file that has a comment "pre-releases" above it:
# pre-releases
- "v[0-9]+.[0-9]+.[0-9]+-**"
@AlCalzone Thanks a lot for the quick reply. I'll give it a try.