@@ -2,12 +2,14 @@ name: Build
2
2
3
3
on :
4
4
push :
5
- branches : [ "main" ]
6
- pull_request :
7
- branches : [ "main" ]
5
+ branches :
6
+ - main
7
+ - zh-CN
8
+ workflow_dispatch :
8
9
9
10
permissions :
10
- contents : read
11
+ actions : write
12
+ contents : write
11
13
12
14
jobs :
13
15
build :
28
30
29
31
steps :
30
32
- uses : actions/checkout@v4
33
+ with :
34
+ ref : ' zh-CN'
31
35
32
36
- name : Add MSBuild to PATH
33
37
uses : microsoft/setup-msbuild@v2
40
44
working-directory : ${{env.GITHUB_WORKSPACE}}
41
45
run : msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{env.BUILD_PLATFORM}} ${{env.SOLUTION_FILE_PATH}}
42
46
47
+ - name : Pack builds
48
+ working-directory : ${{env.GITHUB_WORKSPACE}}
49
+ run : |
50
+ mkdir shell-${{matrix.platform}}
51
+ rm -r ${{env.BIN_PATH}}\*.lib
52
+ rm -r ${{env.BIN_PATH}}\*.exp
53
+ rm -r ${{env.BIN_PATH}}\*.wixpdb
54
+ rm -r ${{env.BIN_PATH}}\ca.dll
55
+ Copy-Item -Path ${{env.BIN_PATH}}\* -Destination shell-${{matrix.platform}} -Recurse
56
+ Compress-Archive -Path shell-${{matrix.platform}} -DestinationPath shell-${{matrix.platform}}.zip
57
+
43
58
- name : Upload artifacts
44
59
uses : actions/upload-artifact@v4
45
60
with :
55
70
compression-level : 6
56
71
overwrite : false
57
72
include-hidden-files : false
73
+
74
+ - name : Create release
75
+ continue-on-error : true
76
+ uses : ncipollo/release-action@v1.14.0
77
+ with :
78
+ name : 中文汉化
79
+ allowUpdates : true
80
+ tag : zh-CN
81
+ commit : zh-CN
82
+ replacesArtifacts : true
83
+ token : ${{ secrets.GITHUB_TOKEN }}
84
+ artifacts : " shell-${{matrix.platform}}.zip"
85
+
86
+ - name : Delete workflow runs
87
+ uses : Mattraks/delete-workflow-runs@main
88
+ with :
89
+ token : ${{ secrets.GITHUB_TOKEN }}
90
+ repository : ${{ github.repository }}
91
+ retain_days : 0
92
+ keep_minimum_runs : 2
0 commit comments