Skip to content

Commit d824d94

Browse files
committed
ci: use github.token for release workflow
1 parent a7e2788 commit d824d94

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ env:
2121
jobs:
2222
check-release:
2323
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
issues: write
27+
pull-requests: write
2428
outputs:
2529
has_release: ${{ steps.check.outputs.has_release }}
2630

@@ -44,7 +48,7 @@ jobs:
4448
echo "has_release=false" >> "$GITHUB_OUTPUT"
4549
fi
4650
env:
47-
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
51+
GITHUB_TOKEN: ${{ github.token }}
4852

4953
- name: Upload .autopub artifact
5054
if: steps.check.outputs.has_release == 'true'
@@ -58,6 +62,11 @@ jobs:
5862
needs: check-release
5963
if: github.ref == 'refs/heads/main' && needs.check-release.outputs.has_release == 'true'
6064
runs-on: ubuntu-latest
65+
permissions:
66+
contents: write
67+
id-token: write
68+
issues: write
69+
pull-requests: write
6170
outputs:
6271
version: ${{ steps.get-version.outputs.version }}
6372

@@ -77,15 +86,15 @@ jobs:
7786

7887
- name: Build and publish
7988
run: |
80-
git remote set-url origin https://${{ secrets.BOT_TOKEN }}@github.com/${{ github.repository }}
89+
git remote set-url origin https://${{ github.token }}@github.com/${{ github.repository }}
8190
echo "✨ Preparing..."
8291
$AUTOPUB_CMD prepare
8392
echo "✨ Building..."
8493
$AUTOPUB_CMD build
8594
echo "✨ Publishing..."
8695
$AUTOPUB_CMD publish
8796
env:
88-
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
97+
GITHUB_TOKEN: ${{ github.token }}
8998

9099
- name: Get project version
91100
id: get-version

0 commit comments

Comments
 (0)