Repository navigation
Description
Reason/Context
Comes from asyncapi/generator#801
tl;dr
Installation of semantic-release and other release dependencies on a CI level is already practiced in our Go projects and works like a charm. Just have a look at:
- https://github.com/asyncapi/parser-go/blob/master/.github/workflows/.releaserc - release config do not have to be in package.json and can be a separate file, inside
.github/workflowsdirectory, so we can replicate it automatically as other workflow files in all repos. - https://github.com/asyncapi/parser-go/blob/master/.github/workflows/release.yml#L51 - since few releases of
semantic-release, dependencies that we now explicitly add as a dependence (like@semantic-release/github) are actually included insemantic-release. So we only need to explicitly install onlyconventional-changelog-conventionalcommits - https://github.com/asyncapi/parser-go/blob/master/.github/workflows/release.yml#L61) - we do not really even have to install
semantic-releaseas a dependency but just use npx likenpx semantic-release(just locking to specific version)
there is one thing I will have to test before I proceed is, what if there is a repo that will get new config but already has some dependencies in place and also a release config in
package.json. For sure dependencies used in a CI will be used instead of those installed withpackage.jsonbut what about the config of the release, which one is first,.releasercorpackage.json- that I do not know yet
Description
What I do with this task is:
- introduce global release config for all. It will be replicated to all repos using
topics_to_include: common-release.- I will add new topic to all repos that have
releaseproperty inpackage.json, unless I know that like in case parser-js release steps are a bit custom - I will not modify
package.json(removereleaseprop) for the repos that will start using global.releaserc. It is just to much effort. This should be done by maintainers at some point of time. Maybe I will find some time to run a script that in all these repos will create agood first issueissue to modifypackage.json
- I will add new topic to all repos that have
- modify current nodejs related release pipeline:
- I will make sure we install only
conventional-changelog-conventionalcommitswith specific version, and runnpx semantic-release(of specific version) instead ofnpm run releasethat callssemantic-release - I will not modify
package.json(removereleasescript). It is just too much effort. This should be done by maintainers at some point of time. Maybe I will find some time to run a script that in all these repos will create agood first issueissue to modifypackage.json
- I will make sure we install only
This is not a mandatory change. If you are a maintainer of Node.js project and you hate this new approach, just please lemme know in a comment to not add common-release topic to your repository. Just keep in mind that because of it, once this PR is merged, you will no longer receive updates to release pipeline and you will have to mange it separately
Activity
derberg commentedon Jul 18, 2022
@asyncapi/tsc_members
Pinging you for important visibility. Please have a look at above change. It is not mandatory, but you need to let me know you do not need it, as by default I will include all Node.js projects.
Even if you agree with the change, you still need to be aware that most probably (95% a chance) I will create a follow-up issue in your repo that explains what changes you have to make in your
package.jsonlater, so it is not confusing for you and contributors that there are 2 separate release configurations in the repoderberg commentedon Aug 18, 2022
ok, trying things out in asyncapi/generator#815
derberg commentedon Aug 30, 2022
ok, it was smooth -> asyncapi/generator#815
after suggested changes to generator, release worked like a charm
derberg commentedon Dec 15, 2022
semantic-releaseuses https://github.com/davidtheclark/cosmiconfig for loading configurations, and according to their docs, unfortunately first priority ispackage.jsonand later dedicated files 😞 so this issue cannot be solved in an easy way that we push new config files and new release setup and that cleanup ofpackage.jsoncan be done later by different contributors.