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
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 }}