Skip to content

Commit

Permalink
chore: add script to update changelog based on release body (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
farhat-ha authored Oct 29, 2024
1 parent 57bda0c commit 4b1c497
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 398 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/update-changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Run on Release Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get release description
working-directory: packages/js
run: |
echo "## Release: ${{ github.event.release.name }}" >> CHANGELOG.md
echo "${{ github.event.release.body }}" >> CHANGELOG.md
echo "" >> CHANGELOg.md
- name: Commit and push changes
working-directory: packages/js
run: |
git config user.name TelnyxIntegrations
git config user.email [email protected]
git add CHANGELOG.md
git commit --no-verify -m "Update CHANGELOG with release ${{ github.event.release.tag_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 0 additions & 7 deletions packages/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"devDependencies": {
"@babel/preset-env": "^7.11.0",
"@release-it/bumper": "^2.0.0",
"@release-it/conventional-changelog": "^3.3.0",
"@rollup/plugin-json": "^4.1.0",
"@types/jest": "^26.0.20",
"@types/node": "20.9.2",
Expand Down Expand Up @@ -90,12 +89,6 @@
"npm": {
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "conventionalcommits",
"infile": "CHANGELOG.md"
}
},
"git": {
"commitMessage": "chore: release webrtc ${version}",
"tagAnnotation": "Release webrtc ${version}",
Expand Down
Loading

0 comments on commit 4b1c497

Please sign in to comment.