This PR adds a new action in CI to protect released sections in the changelog from being changed. It compares the released sections in the changelog from the base branch to the current PR. It fails if a change happens.
Apply "Unlock Released Changelog" to bypass this check when doing a new release.
resolve #1682
This PR adds a new action in CI to protect released sections in the changelog from being changed. It compares the released sections in the changelog from the base branch to the current PR. It fails if a change happens.
Apply "Unlock Released Changelog" to bypass this check when doing a new release.
Action result if we changed the unreleased section: https://github.com/open-telemetry/opentelemetry-go/pull/5560/commits/d640deb435cb54802c6819140ee467ad67b068df Action result if we changed the released section: https://github.com/open-telemetry/opentelemetry-go/pull/5560/commits/d672de7a54d97979b4ec83f864f2c1789f6b292a
Meaning of
awk '/^\<!-- Released section --\>/ {flag=1} /^\<!-- Released section ended --\>/ {flag=0} flag'
/^\<!-- Released section --\>/ {flag=1}
<!-- Released section -->
./^\<!-- Released section ended --\>/ {flag=0}
<!-- Released section ended -->
.flag
lines are printed only when the flag is 1.