From aa7f7c842388fb911364a922caa1e982ab8a1034 Mon Sep 17 00:00:00 2001 From: dylankelly Date: Tue, 29 Oct 2024 17:30:08 +1100 Subject: [PATCH] fix: release publish commit process --- .github/workflows/publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 131281985..509aeb9fb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,17 +42,19 @@ jobs: run: | git config --global user.email "sdp.devs@dpc.vic.gov.au" git config --global user.name "SDP Deploy" + git fetch origin ${{ github.event.release.target_commitish }} + git checkout ${{ github.event.release.target_commitish }} - name: Commit changes if: ${{ !github.event.release.prerelease }} run: | git add . - git commit -m "chore: release ${{ !github.event.release.name }}" + git commit -m "chore: release ${{ github.event.release.name }}" - name: Push changes if: ${{ !github.event.release.prerelease }} run: | - git push origin ${{ github.ref }} # Pushes back to the same branch + git push origin ${{ github.event.release.target_commitish }} # Pushes back to target branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}