forked from SlawekNowy/liblzma
-
Notifications
You must be signed in to change notification settings - Fork 1
181 lines (153 loc) · 4.86 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: GitHub Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
arch: [x64, x86]
mode: [DebugMDd, DebugMTd, ReleaseMD, ReleaseMT]
steps:
- uses: actions/checkout@v2
- uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: ${{ matrix.arch }}
- name: Compile
run: MSBuild.exe /p:Configuration=${{ matrix.mode }} /p:Platform=${{ matrix.arch }} /maxcpucount:16 "liblzma.sln"
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.mode }}-${{ matrix.arch }}
path: build/${{ matrix.mode }}-${{ matrix.arch }}/liblzma.lib
- name: Upload liblzma.pdb artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.mode }}-${{ matrix.arch }}-PDB
path: build/${{ matrix.mode }}-${{ matrix.arch }}/liblzma.pdb
if: ${{ matrix.mode != 'Release' }}
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Download x86 liblzma artifact (MDd)
uses: actions/download-artifact@v3
with:
name: DebugMDd-x86
path: build/x86/md/Debug
- name: Download x86 PDB artifact (MDd)
uses: actions/download-artifact@v3
with:
name: DebugMDd-x86-PDB
path: build/x86/md/Debug
- name: Download x64 liblzma artifact (MDd)
uses: actions/download-artifact@v3
with:
name: DebugMDd-x64
path: build/x64/md/Debug
- name: Download x64 PDB artifact (MDd)
uses: actions/download-artifact@v3
with:
name: DebugMDd-x64-PDB
path: build/x64/md/Debug
- name: Download x86 liblzma artifact (MTd)
uses: actions/download-artifact@v3
with:
name: DebugMTd-x86
path: build/x86/mt/Debug
- name: Download x86 PDB artifact (MTd)
uses: actions/download-artifact@v3
with:
name: DebugMTd-x86-PDB
path: build/x86/mt/Debug
- name: Download x64 liblzma artifact (MTd)
uses: actions/download-artifact@v3
with:
name: DebugMTd-x64
path: build/x64/mt/Debug
- name: Download x64 PDB artifact (MTd)
uses: actions/download-artifact@v3
with:
name: DebugMTd-x64-PDB
path: build/x64/mt/Debug
- name: Download x86 liblzma artifact (MD)
uses: actions/download-artifact@v3
with:
name: ReleaseMD-x86
path: build/x86/md/Release
- name: Download x86 PDB artifact (MD)
uses: actions/download-artifact@v3
with:
name: ReleaseMD-x86-PDB
path: build/x86/md/Release
- name: Download x64 liblzma artifact (MD)
uses: actions/download-artifact@v3
with:
name: ReleaseMD-x64
path: build/x64/md/Release
- name: Download x64 PDB artifact (MD)
uses: actions/download-artifact@v3
with:
name: ReleaseMD-x64-PDB
path: build/x64/md/Release
- name: Download x86 liblzma artifact (MT)
uses: actions/download-artifact@v3
with:
name: ReleaseMT-x86
path: build/x86/md/Release
- name: Download x86 PDB artifact (MT)
uses: actions/download-artifact@v3
with:
name: ReleaseMT-x86-PDB
path: build/x86/md/Release
- name: Download x64 liblzma artifact (MT)
uses: actions/download-artifact@v3
with:
name: ReleaseMT-x64
path: build/x64/md/Release
- name: Download x64 PDB artifact (MT)
uses: actions/download-artifact@v3
with:
name: ReleaseMT-x64-PDB
path: build/x64/md/Release
- name: Delete workflow artifacts
uses: geekyeggo/delete-artifact@v1
with:
name: |
DebugMDd-x86
DebugMDd-x86-PDB
DebugMDd-x64
DebugMDd-x64-PDB
DebugMTd-x86
DebugMTd-x86-PDB
DebugMTd-x64
DebugMTd-x64-PDB
ReleaseMD-x86
ReleaseMD-x86-PDB
ReleaseMD-x64
ReleaseMD-x64-PDB
ReleaseMT-x86
ReleaseMT-x86-PDB
ReleaseMT-x64
ReleaseMT-x64-PDB
- name: Create .zip archive
run: |
mkdir -p liblzma
mv build liblzma/lib
mv include liblzma
if ! hash zip 2>/dev/null; then
apt install -y zip
fi
zip -r "liblzma-msvc.zip" liblzma
env:
VERSION_TAG: ${{ github.ref_name }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: "liblzma-msvc.zip"
bodyFile: .github/release_message.md
token: ${{ secrets.GITHUB_TOKEN }}