Skip to content

Commit e291c67

Browse files
committed
ci: squash pr commits
1 parent a7a96e1 commit e291c67

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/enforce-semantic-commits.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434
PR_TITLE='${{ github.event.pull_request.title }}'
3535
echo "PR TITLE": '$PR_TITLE'
3636
echo "$PR_TITLE" | npx commitlint
37+
echo "::set-output name=pr_title::$PR_TITLE"
3738
3839
generate-changelog:
40+
needs: [check-pr-title]
3941
name: Generate Changelog #? should we comment in the PR?
4042
runs-on: ubuntu-latest
4143
steps:
@@ -44,7 +46,11 @@ jobs:
4446
fetch-depth: 0
4547
- uses: ./.github/actions/setup
4648

47-
- name: Generate Changelog
49+
- name: Generate tmp branch
50+
run: git checkout -b changelog
51+
52+
- name: Squash commits
4853
run: |
49-
git checkout -b changelog
50-
npx nx version ngx-deploy-npm --dry-run
54+
git reset --soft `git merge-base main HEAD`
55+
git commit -m "${{ steps.check-title.outputs.pr_title }}"
56+
git log

0 commit comments

Comments
 (0)