Skip to content

Commit

Permalink
Add autochangelog (#186)
Browse files Browse the repository at this point in the history
* Add autochangelog

* Add newline
  • Loading branch information
Twixes authored Feb 25, 2021
1 parent 3759211 commit 220333b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Changes

...

## Checklist
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/auto-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 220333b

Please sign in to comment.