chore(release): change release to access token instead of actions bot

This commit is contained in:
PandaDEV 2025-01-11 00:41:25 +10:00
parent 42aa72f3b8
commit c2ea79c29d
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C

View file

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