Skip to content

Commit

Permalink
chore(release): change release to access token instead of actions bot
Browse files Browse the repository at this point in the history
  • Loading branch information
0PandaDEV committed Jan 10, 2025
1 parent 42aa72f commit c2ea79c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,20 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PAT }}

- name: Check if release already exists
id: check_release
run: |
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'
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit c2ea79c

Please sign in to comment.