-
Notifications
You must be signed in to change notification settings - Fork 125
96 lines (93 loc) · 3.09 KB
/
MediaDownloader4Windows.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
name: MediaDownloader4Windows
on: push
env:
QT_VERSION: "5.15.2"
MINGW_VERSION: "win32_mingw81"
MINGW_PATH: "mingw81_32"
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
-
uses: actions/checkout@v2
# -
# name: Check mingw g++ version
# run: |
# Write-Output (Get-Command g++.exe).Path
# g++.exe --version
-
name: Install correct version of mingw
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install mingw --version=8.1.0 -y
# -
# name: Check mingw directory
# run: |
# ls C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
-
name: Install Qt
uses: jurplel/install-qt-action@v2
with:
host: windows
target: "desktop"
version: ${{ env.QT_VERSION }}
arch: ${{ env.MINGW_VERSION }}
dir: "${{github.workspace}}/qt"
install-deps: "true"
-
name: Set Qt path and refresh
run: |
echo "${{github.workspace}}/qt/Qt/${{ env.QT_VERSION }}/${{ env.MINGW_PATH }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
refreshenv
#Write-Output (Get-Command g++.exe).Path
#g++.exe --version
# -
# name: Check availability of libraries
# run: |
# ls ${{github.workspace}}/qt/Qt/${{ env.QT_VERSION }}/${{ env.MINGW_PATH }}/lib/
# -
# name: Check availability of binaries
# run: |
# ls ${{github.workspace}}/qt/Qt/${{ env.QT_VERSION }}/${{ env.MINGW_PATH }}/bin/
# -
# name: Prepend path
# run: echo ":${{github.workspace}}/qt/Qt/${{ env.QT_VERSION }}/mingw73_32/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# -
# name: Check QMake, CMake and make
# run: |
# Write-Output (Get-Command qmake.exe).Path
# qmake.exe -version
# Write-Output (Get-Command cmake.exe).Path
# cmake.exe -version
# Write-Output (Get-Command mingw32-make.exe).Path
# mingw32-make.exe -version
-
name: Configure CMake Proyect
working-directory: ${{github.workspace}}
env:
CMAKE_PREFIX_PATH: ${{env.Qt5_Dir}}
run: cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G "CodeBlocks - MinGW Makefiles" -B ${{github.workspace}}/build
-
name: Build proyect
working-directory: ${{github.workspace}}/build
run: |
mingw32-make.exe
-
name: Compress portable program
run: |
mkdir ${{github.workspace}}\build\all\
mkdir ${{github.workspace}}\build\all\local
cp ${{github.workspace}}/build/media-downloader.exe ${{github.workspace}}\build\all\
cd ${{github.workspace}}\build\all\
windeployqt.exe media-downloader.exe --release
ls
Compress-Archive -Path ${{github.workspace}}\build\all\ -DestinationPath ${{github.workspace}}\build\final.zip
-
name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/build/final.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}