opentelemetry-js icon indicating copy to clipboard operation
opentelemetry-js copied to clipboard

feat: add more release scripts

Open pichlermarc opened this issue 1 year ago • 0 comments

Which problem is this PR solving?

Adds a few more script for release-automation that I usually did by hand. Moving us closer to having a fully-automated solution. This adds:

  • automatic minor version bumps for API releases
    • we only had Experimental/Stable changes automated previously. We cannot use lerna for this as there's no way to just bump the API package and have it widen the < version ranges. Before this I used to manually update all dependencies, which was error-prone and tedious.
    • this adds the script to align the dependencies to each package so that we can call it via lerna
  • a restriction on how API dependencies can be written to simplify the automatic version bumps from the script mentioned above:
    • A.B.C is allowed
    • ^A.B.C is allowed (default for instrumentation packages)
    • >=A.B.C <X.Y.Z is allowed (default for SDK packages)
  • script to automatically create draft github releases
    • this was also done manually, by manually copying from the respective CHANGELOG.md (up to 3 times per release), manually typing the release title and manually creating a tag.
  • script to automate updating api/CHANGELOG.md

PR creation, publishing packages and publishing Github Releases remains manual.

Additional changes:

  • adds peer-api-check to some packages where it was missing
  • aligns headings in api/CHANGELOG.md to avoid having them removed by the automatic updating of api/CHANGELOG.md

Next steps:

  • scripts to automatically create a release PRs
  • automatically create release PRs via @opentelemetrybot
  • scripts to automatically push to npm when a release PR is merged

How Has This Been Tested?

  • [x] Manual testing

pichlermarc avatar May 14 '24 13:05 pichlermarc