1010 # 允许手动触发工作流
1111 workflow_dispatch :
1212
13+ # 添加权限配置
14+ permissions :
15+ contents : write
16+ packages : write
17+
1318jobs :
1419 build :
1520 runs-on : ubuntu-latest
@@ -105,43 +110,14 @@ jobs:
105110 echo "EOF" >> $GITHUB_OUTPUT
106111
107112 - name : 创建GitHub Release
108- id : create_release
109- uses : actions/create-release@v1
110- env :
111- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113+ uses : softprops/action-gh-release@v1
112114 with :
113115 tag_name : ${{ github.ref }}
114- release_name : Pro Color v${{ steps.get_version.outputs.VERSION }}
116+ name : Pro Color v${{ steps.get_version.outputs.VERSION }}
115117 body : ${{ steps.changelog.outputs.CHANGELOG }}
116118 draft : false
117119 prerelease : false
118-
119- - name : 上传ZIP资源
120- uses : actions/upload-release-asset@v1
121- env :
122- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
123- with :
124- upload_url : ${{ steps.create_release.outputs.upload_url }}
125- asset_path : ./dist/release/pro-color-v${{ steps.get_version.outputs.VERSION }}.zip
126- asset_name : pro-color-v${{ steps.get_version.outputs.VERSION }}.zip
127- asset_content_type : application/zip
128-
129- - name : 上传CRX资源
130- uses : actions/upload-release-asset@v1
131- env :
132- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
133- with :
134- upload_url : ${{ steps.create_release.outputs.upload_url }}
135- asset_path : ./dist/release/pro-color-v${{ steps.get_version.outputs.VERSION }}.crx
136- asset_name : pro-color-v${{ steps.get_version.outputs.VERSION }}.crx
137- asset_content_type : application/x-chrome-extension
138-
139- - name : 上传版本信息
140- uses : actions/upload-release-asset@v1
141- env :
142- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
143- with :
144- upload_url : ${{ steps.create_release.outputs.upload_url }}
145- asset_path : ./dist/release/version-info.json
146- asset_name : version-info.json
147- asset_content_type : application/json
120+ files : |
121+ ./dist/release/pro-color-v${{ steps.get_version.outputs.VERSION }}.zip
122+ ./dist/release/pro-color-v${{ steps.get_version.outputs.VERSION }}.crx
123+ ./dist/release/version-info.json
0 commit comments