-
Notifications
You must be signed in to change notification settings - Fork 262
160 lines (136 loc) · 5.37 KB
/
build-pr.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
name: Build and Upload Pull Request
on:
push:
branches: [ master ]
pull_request:
types: [ opened, reopened ]
jobs:
build-gui:
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderWPF
- name: Build Windows GUI
run: dotnet publish TwitchDownloaderWPF -p:PublishProfile=Windows -p:DebugType=None -p:DebugSymbols=false
- name: Download FFmpeg To Workspace
# You may pin to the exact commit or the version.
# uses: carlosperate/download-file-action@e85e0aa6262f13571d17a4a39687b26981c583dc
uses: carlosperate/[email protected]
with:
# URL of the file to download
file-url: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
# New filename to rename the downloaded file
file-name: ffmpeg.zip
- name: Bundle FFmpeg
run: tar xfz ffmpeg.zip --strip-components=1; copy bin/ffmpeg.exe TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64/ffmpeg.exe
- name: Zip Windows GUI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderWPF/bin/Release/net6.0-windows/publish/win-x64"
dest: TwitchDownloaderGUI-Windows-x64.zip
- name: Upload Windows GUI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderGUI-Windows-x64.zip
path: TwitchDownloaderGUI-Windows-x64.zip
build-cli:
runs-on: ubuntu-20.04
needs: [build-gui]
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderCLI
- name: Build Windows CLI
run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=Windows -p:DebugType=None -p:DebugSymbols=false
- name: Build Linux CLI
run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=Linux -p:DebugType=None -p:DebugSymbols=false
- name: Build LinuxAlpine CLI
run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=LinuxAlpine -p:DebugType=None -p:DebugSymbols=false
- name: Build LinuxArm CLI
run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=LinuxArm -p:DebugType=None -p:DebugSymbols=false
- name: Build LinuxArm64 CLI
run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=LinuxArm64 -p:DebugType=None -p:DebugSymbols=false
- name: Zip Windows CLI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/Windows"
dest: TwitchDownloaderCLI-Windows-x64.zip
- name: Zip Linux CLI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/Linux"
dest: TwitchDownloaderCLI-Linux-x64.zip
- name: Zip LinuxAlpine CLI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxAlpine"
dest: TwitchDownloaderCLI-LinuxAlpine-x64.zip
- name: Zip LinuxArm CLI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxArm"
dest: TwitchDownloaderCLI-LinuxArm.zip
- name: Zip LinuxArm64 CLI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/LinuxArm64"
dest: TwitchDownloaderCLI-LinuxArm64.zip
- name: Upload Windows CLI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderCLI-Windows-x64.zip
path: TwitchDownloaderCLI-Windows-x64.zip
- name: Upload Linux CLI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderCLI-Linux-x64.zip
path: TwitchDownloaderCLI-Linux-x64.zip
- name: Upload LinuxAlpine CLI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderCLI-LinuxAlpine-x64.zip
path: TwitchDownloaderCLI-LinuxAlpine-x64.zip
- name: Upload LinuxArm CLI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderCLI-LinuxArm.zip
path: TwitchDownloaderCLI-LinuxArm.zip
- name: Upload LinuxArm64 CLI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderCLI-LinuxArm64.zip
path: TwitchDownloaderCLI-LinuxArm64.zip
build-cli-mac:
runs-on: macos-latest
needs: [build-cli]
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Dependencies
run: dotnet restore TwitchDownloaderCLI
- name: Build MacOS CLI
run: dotnet publish TwitchDownloaderCLI -p:PublishProfile=MacOS -p:DebugType=None -p:DebugSymbols=false
- name: Zip MacOS CLI
uses: vimtor/action-zip@v1
with:
files: "TwitchDownloaderCLI/bin/Release/net6.0/publish/MacOS"
dest: TwitchDownloaderCLI-MacOS-x64.zip
- name: Upload MacOS CLI Artifact Asset
uses: actions/upload-artifact@v3
with:
name: TwitchDownloaderCLI-MacOS-x64.zip
path: TwitchDownloaderCLI-MacOS-x64.zip