diff --git a/.github/workflows/build_dist_on_merge.yml b/.github/workflows/build_dist_on_merge.yml index 1a5c51f..b08878f 100644 --- a/.github/workflows/build_dist_on_merge.yml +++ b/.github/workflows/build_dist_on_merge.yml @@ -13,6 +13,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} + fetch-depth: 2 - name: Set up Node.js uses: actions/setup-node@v4 @@ -25,6 +26,15 @@ jobs: - name: Build project run: yarn build + - name: Get last commit message + id: last-commit + run: | + echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT + echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT + - uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: rebuild + commit_message: ${{ steps.last-commit.outputs.message }} + commit_options: '--amend --no-edit' + push_options: '--force' + skip_fetch: true