diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 0547b90..c64ad5d 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -26,6 +26,8 @@ jobs: with: ref: main fetch-depth: 0 + # ACTIONS_TOKEN required to push to protected main branch + token: ${{ secrets.ACTIONS_TOKEN || github.token }} - name: Setup Python uses: actions/setup-python@v5 diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 4fd8aab..b559ef8 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -36,7 +36,8 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ inputs.branch_ref }} - token: ${{ github.token }} + # ACTIONS_TOKEN required to push tags to protected repo + token: ${{ secrets.ACTIONS_TOKEN || github.token }} fetch-depth: 0 - name: Get Version from pyproject.toml @@ -256,7 +257,8 @@ jobs: draft: false prerelease: false env: - GITHUB_TOKEN: ${{ github.token }} + # ACTIONS_TOKEN preferred for release creation + GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN || github.token }} - name: Create release summary if: steps.check-tag.outputs.tag_exists == 'false'