open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.27k stars 1.41k forks source link

[release] Autopopulate release notes in Github release #10191

Open mx-psi opened 3 months ago

mx-psi commented 3 months ago

Currently, the release manager needs to manually copy release notes from CHANGELOG.md and CHANGELOG-API.md into the Github release. This is easy to forget, and a step that could be automated. We should automate it!

Part of the retro for v0.100.0 release.

animeshdas2000 commented 3 months ago

Hi @mx-psi, if I understand it right, we are looking to automate the release notes from the Github releases section? I am happy to contribute

mx-psi commented 3 months ago

Hi @mx-psi, if I understand it right, we are looking to automate the release notes from the Github releases section? I am happy to contribute

Yes! So e.g. we would add the release notes here https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.101.0 (which were added manually) in an automated way. Assigned to you :)

animeshdas2000 commented 3 months ago

Great thanks. Let me get started, I'll share an update soon :)

animeshdas2000 commented 3 months ago

I have gone through the release process in RELEASE.md. I saw the workflow file builder-release.yaml runs when there's a new release to be done. Just want to confirm if this is the last step in the release process where we create this release.

Snippet from builder-release.yaml

- name: Create Github Release 
    run: | 
          gh release create ${{ github.ref_name }} -t ${{ github.ref_name }} -n 
         "### Images and binaries here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/${{ github.ref_name }}"

If so, assuming the CHANGELOG.md and CHANGELOG-API.md would've been populated with the latest release notes. I'll just fetch it from the respective files as add it here itself.

Alternatively, if I've understood this incorrectly. Please let me know

mx-psi commented 3 months ago

@animeshdas2000 I think that's right, yes. Those files should have been populated in a previous step of the release, so you can fetch its contents if that's the easiest way to go about this.

animeshdas2000 commented 3 months ago

@mx-psi I have written a script which extracts all the relevant changelog. I need to test it with github actions, what's the best apporach you'd suggest. Since this is a part of release I am not sure how this should be tested. Although I've tested it locally.

mx-psi commented 3 months ago

@animeshdas2000 You should be able to test it by forking this repository and making a test release on that repository (you can do the fork by clicking on the 'Fork' button at the top of https://github.com/open-telemetry/opentelemetry-collector).