diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index b31e5b6..2f34060 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.RELEASE_TOKEN }} - name: Setup Go uses: actions/setup-go@v5 @@ -38,7 +38,7 @@ jobs: - name: Configure Git env: - TOKEN: ${{ secrets.GITHUB_TOKEN }} + TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | git config --global advice.detachedHead false git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" @@ -64,6 +64,7 @@ jobs: if: steps.changes.outputs.HAS_CHANGES == 'true' env: IS_MINOR: ${{ contains(inputs.release-as-minor, 'true') }} + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | CURRENT_VERSION_PARTS=(${CURRENT_VERSION//./ }) MAJOR=${CURRENT_VERSION_PARTS[0]} @@ -87,6 +88,8 @@ jobs: - name: Release New Version if: ${{ success() && github.ref_name == 'master' && steps.changes.outputs.HAS_CHANGES == 'true' && !inputs.skip-release }} + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | git tag -a ${NEW_VERSION} -m "New version ${NEW_VERSION}" echo "Pushing new tag to remote, which will trigger the Release workflow" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c645b08..854a6f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,4 +41,4 @@ jobs: args: release --clean env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} \ No newline at end of file