diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3e81cde..0ef8be2 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -53,8 +53,13 @@ jobs: git config --local user.name "github-actions[bot]" git commit -a -m "Update toml version" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} \ No newline at end of file + - name: Push changes and update tag + run: | + # Push changes to main/master branch + git push origin HEAD:main || git push origin HEAD:master + + # Force update the tag to point to the new commit + git tag -fa ${GITHUB_REF#refs/tags/} -m "Update tag to include toml version change" + git push origin --force ${GITHUB_REF#refs/tags/} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file