@@ -3,6 +3,8 @@ name: Build USVFS
3
3
on :
4
4
push :
5
5
branches : [master, dev/cmake]
6
+ tags :
7
+ - " *"
6
8
pull_request :
7
9
types : [opened, synchronize, reopened]
8
10
@@ -65,19 +67,14 @@ jobs:
65
67
path : ./test/bin
66
68
67
69
# merge x86 / x64 artifacts
68
- merge-artifacts :
70
+ merge-artifacts-for-tests :
69
71
runs-on : ubuntu-latest
70
- name : Merge Artifacts
72
+ name : Merge Test Artifacts
71
73
needs : build
72
74
strategy :
73
75
matrix :
74
76
config : [Debug, Release]
75
77
steps :
76
- - name : Merge USVFS install
77
- uses : actions/upload-artifact/merge@v4
78
- with :
79
- name : usvfs_${{ matrix.config }}
80
- pattern : usvfs_${{ matrix.config }}_*
81
78
- name : Merge USVFS libs
82
79
uses : actions/upload-artifact/merge@v4
83
80
with :
94
91
name : usvfs-tests_${{ matrix.config }}
95
92
pattern : usvfs-tests_${{ matrix.config }}_*
96
93
94
+ # merge x86 / x64 artifacts
95
+ merge-artifacts-for-release :
96
+ runs-on : ubuntu-latest
97
+ name : Merge Install Artifacts
98
+ needs : build
99
+ steps :
100
+ - name : Merge USVFS install
101
+ uses : actions/upload-artifact/merge@v4
102
+ with :
103
+ name : usvfs
104
+ pattern : usvfs_*
105
+
97
106
test :
98
107
name : Test USVFS
99
- needs : merge-artifacts
108
+ needs : merge-artifacts-for-tests
100
109
runs-on : windows-2022
101
110
strategy :
102
111
matrix :
@@ -136,3 +145,25 @@ jobs:
136
145
if-no-files-found : ignore
137
146
retention-days : 7
138
147
overwrite : true
148
+
149
+ publish :
150
+ if : github.ref_type == 'tag'
151
+ needs : [merge-artifacts-for-release, test]
152
+ runs-on : windows-2022
153
+ permissions :
154
+ contents : write
155
+ steps :
156
+ - name : Download Artifact
157
+ uses : actions/download-artifact@master
158
+ with :
159
+ name : usvfs
160
+ path : ./install
161
+
162
+ - name : Create USVFS Base archive
163
+ run : 7z a usvfs_${{ github.ref_name }}.7z ./install/*
164
+
165
+ - name : Publish Release
166
+ env :
167
+ GH_TOKEN : ${{ github.token }}
168
+ GH_REPO : ${{ github.repository }}
169
+ run : gh release create --draft=false --notes="Release ${{ github.ref_name }}" "${{ github.ref_name }}" ./usvfs_${{ github.ref_name }}.7z
0 commit comments