Skip to content

Commit c0ffff8

Browse files
committed
💚 ci: 更新 GitHub Actions 工作流中的 actions 版本
将 upload-artifact 和 download-artifact 升级到 v4 版本,并使用 softprops/action-gh-release 替代 actions/create-release 和 actions/upload-release-asset,简化发布流程
1 parent 2722df9 commit c0ffff8

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.github/workflows/build-and-release.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
pyinstaller SimpleCutPy.spec
4040
4141
- name: Upload build artifacts
42-
uses: actions/upload-artifact@v3
42+
uses: actions/upload-artifact@v4
4343
with:
4444
name: SimpleCutPy-build
4545
path: dist/SimpleCutPy/
@@ -53,7 +53,7 @@ jobs:
5353
- uses: actions/checkout@v3
5454

5555
- name: Download build artifacts
56-
uses: actions/download-artifact@v3
56+
uses: actions/download-artifact@v4
5757
with:
5858
name: SimpleCutPy-build
5959
path: dist/SimpleCutPy/
@@ -65,21 +65,12 @@ jobs:
6565
6666
- name: Create Release
6767
id: create_release
68-
uses: actions/create-release@v1
68+
uses: softprops/action-gh-release@v2
6969
env:
7070
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7171
with:
7272
tag_name: ${{ github.ref_name }}
73-
release_name: Release ${{ github.ref_name }}
73+
name: Release ${{ github.ref_name }}
7474
draft: false
7575
prerelease: false
76-
77-
- name: Upload Release Asset
78-
uses: actions/upload-release-asset@v1
79-
env:
80-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81-
with:
82-
upload_url: ${{ steps.create_release.outputs.upload_url }}
83-
asset_path: dist/SimpleCutPy-${{ github.ref_name }}.zip
84-
asset_name: SimpleCutPy-${{ github.ref_name }}.zip
85-
asset_content_type: application/zip
76+
files: dist/SimpleCutPy-${{ github.ref_name }}.zip

0 commit comments

Comments
 (0)