Skip to content

Commit 0120e4d

Browse files
committed
update lock
1 parent 9762034 commit 0120e4d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
branches:
55
- main
66

7+
# Set proper permissions for GITHUB_TOKEN
8+
permissions:
9+
contents: write # to create release/tag (semantic-release)
10+
issues: write # to create issues
11+
pull-requests: write # to create pull requests
12+
packages: write # to publish packages
13+
714
jobs:
815
release:
916
name: Release
@@ -13,7 +20,7 @@ jobs:
1320
uses: actions/checkout@v3
1421
with:
1522
fetch-depth: 0
16-
persist-credentials: false
23+
# Don't use persist-credentials: false, it causes issues
1724

1825
- name: Setup Node.js
1926
uses: actions/setup-node@v3
@@ -38,11 +45,12 @@ jobs:
3845

3946
- name: Release
4047
env:
48+
# Use the default GITHUB_TOKEN with proper permissions set at workflow level
4149
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4250
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4351
run: |
4452
# Configure Git user
45-
git config --global user.name "GitHub Actions"
46-
git config --global user.email "actions@github.com"
53+
git config --global user.name "github-actions[bot]"
54+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
4755
# Run semantic-release
4856
npx semantic-release

0 commit comments

Comments
 (0)