Skip to content

Commit d3023fd

Browse files
committed
fix: use action-gh-release in release action
1 parent 5c2bcb6 commit d3023fd

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,12 @@ jobs:
4141
- name: Zip Portable (any-x64)
4242
run: zip -r any-x64.zip output/any-x64
4343

44-
# 上传编译结果到 Release
45-
- name: Upload Artifacts
46-
uses: actions/upload-release-asset@v1
44+
- name: Release
45+
uses: softprops/action-gh-release@v2
46+
if: startsWith(github.ref, 'refs/tags/')
4747
with:
48-
upload_url: ${{ github.event.release.upload_url }}
49-
asset_path: linux-x64.zip
50-
asset_name: linux-x64.zip
51-
asset_content_type: application/zip
48+
files: |
49+
linux-x64.zip
50+
win-x64.zip
51+
any-x64.zip
5252
53-
- name: Upload Artifacts
54-
uses: actions/upload-release-asset@v1
55-
with:
56-
upload_url: ${{ github.event.release.upload_url }}
57-
asset_path: win-x64.zip
58-
asset_name: win-x64.zip
59-
asset_content_type: application/zip
60-
61-
- name: Upload Artifacts
62-
uses: actions/upload-release-asset@v1
63-
with:
64-
upload_url: ${{ github.event.release.upload_url }}
65-
asset_path: any-x64.zip
66-
asset_name: any-x64.zip
67-
asset_content_type: application/zip

0 commit comments

Comments
 (0)