File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,15 +32,20 @@ jobs:
3232 - name : Build package
3333 run : pnpm build
3434
35- # Automatically generate changelog and update package.json version
35+ # Generate changelog and update package.json version
36+ - name : Generate changelog
37+ run : npx standard-version --release-as ${{ github.event.release.tag_name }} --no-verify
38+ env :
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+
41+ # Push changelog and package.json back to main
3642 - name : Push changelog back to main
3743 run : |
3844 git config user.name "github-actions[bot]"
3945 git config user.email "github-actions[bot]@users.noreply.github.com"
4046 git pull origin main --rebase # Ensure the branch is up-to-date
41- cp CHANGELOG.md CHANGELOG.md # Note: This line seems unnecessary; verify if needed
4247 git add CHANGELOG.md package.json
43- git commit -m "docs(release): update changelog [skip ci]" || echo "No changes to commit"
48+ git commit -m "docs(release): update changelog and version [skip ci]" || echo "No changes to commit"
4449 git push origin main
4550 env :
4651 GIT_AUTHOR_NAME : github-actions[bot]
You can’t perform that action at this time.
0 commit comments