Skip to content

Commit f3283da

Browse files
committed
修复发布工作流权限问题
1 parent 53a334b commit f3283da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ on:
1515
required: true
1616
type: string
1717

18+
# 权限配置
19+
permissions:
20+
contents: write # 需要写权限来创建 Release
21+
packages: write # 如果需要发布包
22+
actions: read # 读取 Actions 权限
23+
1824
# 环境变量
1925
env:
2026
NODE_VERSION: '18'
@@ -118,6 +124,8 @@ jobs:
118124
119125
- name: 🏷️ 创建 GitHub Release
120126
uses: softprops/action-gh-release@v1
127+
env:
128+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121129
with:
122130
tag_name: ${{ steps.release_info.outputs.tag_name }}
123131
name: ${{ steps.release_info.outputs.release_name }}

0 commit comments

Comments
 (0)