-
Notifications
You must be signed in to change notification settings - Fork 103
196 lines (189 loc) · 7.69 KB
/
release-build-upload.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# This is a basic workflow to help you get started with Actions
name: release-build-upload
# Controls when the workflow will run
on:
release:
types: [ created ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-upload_windows-x86:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: install qt static
uses: orestonce/install-qt@main
with:
version: Qt5.6.3-Windows-x86-MinGW4.9.4-staticFull-20200104
- name: Setup Go environment
uses: actions/setup-go@v3.2.1
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.18 # optional
- name: build
run: |
go mod tidy
go run export/main.go update-version-info
go run export/main.go build-cli
go run export/main.go create-qt-lib 386 c-archive
cd m3u8d-qt && qmake && mingw32-make release && cd ..
dir m3u8d-qt\release\m3u8d-qt.exe
- name: upload release m3u8d_windows_x86_qt
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_windows_x86_qt-${{ github.ref_name }}.exe
path: m3u8d-qt/release/m3u8d-qt.exe
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_windows_x86_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_windows_x86_cli-${{ github.ref_name }}.exe
path: bin/m3u8d_windows_386_cli.exe
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_windows_x64_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_windows_x64_cli-${{ github.ref_name }}.exe
path: bin/m3u8d_windows_amd64_cli.exe
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_linux_x86_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_linux_x86_cli-${{ github.ref_name }}
path: bin/m3u8d_linux_386_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_linux_x64_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_linux_x64_cli-${{ github.ref_name }}
path: bin/m3u8d_linux_amd64_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_linux_arm_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_linux_arm_cli-${{ github.ref_name }}
path: bin/m3u8d_linux_arm_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_linux_arm64_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_linux_arm64_cli-${{ github.ref_name }}
path: bin/m3u8d_linux_arm64_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_linux_mipsle_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_linux_mipsle_cli-${{ github.ref_name }}
path: bin/m3u8d_linux_mipsle_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_darwin_x64_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_darwin_x64_cli-${{ github.ref_name }}
path: bin/m3u8d_darwin_amd64_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: upload release m3u8d_android_arm64_cli
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_android_arm64_cli-${{ github.ref_name }}
path: bin/m3u8d_android_arm64_cli
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-upload_windows-x64:
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: install qt static
uses: orestonce/install-qt@main
with:
version: Qt5.15.7-Windows-x86_64-MinGW8.1.0-staticFull-20221104
- name: Setup Go environment
uses: actions/setup-go@v3.2.1
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.18 # optional
- name: build
run: |
go mod tidy
go run export/main.go update-version-info
go run export/main.go create-qt-lib amd64 c-archive
cd m3u8d-qt && qmake && mingw32-make release && cd ..
dir m3u8d-qt\release\m3u8d-qt.exe
- name: upload release m3u8d_windows_x64_qt
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_windows_x64_qt-${{ github.ref_name }}.exe
path: m3u8d-qt/release/m3u8d-qt.exe
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-upload_macos-arm64:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: install qt
uses: orestonce/install-qt@main
with:
version: Qt6.7.2-macOS-Universal-AppleClang15.0.0-noFramework-20240621
- name: Setup Go environment
uses: actions/setup-go@v3.2.1
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.18 # optional
- name: build
run: |
set -x
set -e
go mod tidy
go run export/main.go update-version-info
go run export/main.go create-qt-lib arm64 c-shared
cd m3u8d-qt && qmake && make && cd ..
cd m3u8d-qt
install_name_tool -change m3u8d-impl @executable_path/m3u8d-impl m3u8d-qt.app/Contents/MacOS/m3u8d-qt
cp m3u8d-impl m3u8d-qt.app/Contents/MacOS/
macdeployqt m3u8d-qt.app -dmg
ls -alh m3u8d-qt.dmg
file m3u8d-qt.dmg m3u8d-impl m3u8d-qt.app/Contents/MacOS/m3u8d-qt
cd ./m3u8d-qt.app
./Contents/MacOS/m3u8d-qt test-startup
- name: upload release m3u8d_darwin_arm64_qt
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_darwin_arm64_qt-${{ github.ref_name }}.dmg
path: m3u8d-qt/m3u8d-qt.dmg
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-upload_macos-amd64:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: install qt
uses: orestonce/install-qt@main
with:
version: Qt6.7.2-macOS-Universal-AppleClang15.0.0-noFramework-20240621
- name: Setup Go environment
uses: actions/setup-go@v3.2.1
with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.18 # optional
- name: build
run: |
set -x
set -e
go mod tidy
go run export/main.go update-version-info
go run export/main.go create-qt-lib amd64 c-shared
cd m3u8d-qt && qmake && make && cd ..
cd m3u8d-qt
install_name_tool -change m3u8d-impl @executable_path/m3u8d-impl m3u8d-qt.app/Contents/MacOS/m3u8d-qt
cp m3u8d-impl m3u8d-qt.app/Contents/MacOS/
macdeployqt m3u8d-qt.app -dmg
file m3u8d-qt.dmg m3u8d-impl m3u8d-qt.app/Contents/MacOS/m3u8d-qt
cd ./m3u8d-qt.app
./Contents/MacOS/m3u8d-qt test-startup
- name: upload release m3u8d_darwin_x64_qt
uses: Guerra24/upload-to-release@v1
with:
name: m3u8d_darwin_x64_qt-${{ github.ref_name }}.dmg
path: m3u8d-qt/m3u8d-qt.dmg
repo-token: ${{ secrets.GITHUB_TOKEN }}