diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f3b396bf1..aba4c967c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,5 @@ ## Changes + ... ## Checklist diff --git a/.github/workflows/auto-new-version.yml b/.github/workflows/auto-new-version.yml index 8294a9fb2..3f3a2ff79 100644 --- a/.github/workflows/auto-new-version.yml +++ b/.github/workflows/auto-new-version.yml @@ -46,6 +46,20 @@ jobs: - name: Install dependencies run: yarn --frozen-lockfile + - name: Update CHANGELOG.md + run: | + CHANGELOG_HEADING='## '$COMMITTED_VERSION' - '$(date --iso-8601) + CHANGELOG_POINTS=$(git log v$PUBLISHED_VERSION..v$COMMITTED_VERSION --pretty=format:"%s" | sed -e '/^(Bump version|Update CHANGELOG).*$/d' -e 's/^/- /') + mv CHANGELOG.md CHANGELOG.old.md + echo -e "$CHANGELOG_HEADING\n\n$CHANGELOG_POINTS\n\n$(cat CHANGELOG.old.md)" > CHANGELOG.md + rm CHANGELOG.old.md + + - name: Commit CHANGELOG.md update + uses: EndBug/add-and-commit@v7 + with: + branch: master + message: 'Update CHANGELOG.md for ${{ env.COMMITTED_VERSION }}' + - name: Publish the package in the npm registry run: npm publish --access public env: