Skip to content

Commit 9e14a57

Browse files
authored
Merge pull request #20 from Souma-Sumire/master
feat: 发布到release
2 parents ee70e29 + e345c1a commit 9e14a57

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/build-dotnet.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- master
7+
tags:
8+
- 'v*'
79
pull_request:
810
branches:
911
- master
@@ -30,7 +32,22 @@ jobs:
3032
cp 渔人的直感/Wav/* temp_artifact/
3133
3234
- name: Upload artifacts
35+
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
3336
uses: actions/upload-artifact@v4 # 更新为 v4
3437
with:
3538
name: FishersIntuition
3639
path: temp_artifact/*
40+
41+
- name: Zip release files
42+
if: startsWith(github.ref, 'refs/tags/v')
43+
run: powershell Compress-Archive -Path temp_artifact/* -DestinationPath FishersIntuition-${{ github.ref_name }}.zip
44+
45+
- name: Create GitHub Release
46+
if: startsWith(github.ref, 'refs/tags/v')
47+
uses: softprops/action-gh-release@v2
48+
with:
49+
name: "渔人的直感 ${{ github.ref_name }}"
50+
tag_name: ${{ github.ref_name }}
51+
files: FishersIntuition-${{ github.ref_name }}.zip
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)