diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a11091..479bc4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -233,6 +233,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + token: ${{ secrets.PAT }} - name: Check if release already exists id: check_release @@ -240,14 +241,12 @@ jobs: VERSION="${{ needs.prepare.outputs.version }}" RELEASE_EXISTS=$(gh release view v$VERSION --json id --jq '.id' 2>/dev/null || echo "") if [ -n "$RELEASE_EXISTS" ]; then - echo "Release v$VERSION already exists. Skipping release creation." echo "SKIP_RELEASE=true" >> $GITHUB_ENV else - echo "Release v$VERSION does not exist. Proceeding with release creation." echo "SKIP_RELEASE=false" >> $GITHUB_ENV fi env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} - name: Download all artifacts if: env.SKIP_RELEASE == 'false' @@ -312,7 +311,7 @@ jobs: if: env.SKIP_RELEASE == 'false' uses: softprops/action-gh-release@v2 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} with: draft: true tag_name: v${{ needs.prepare.outputs.version }}