-
Notifications
You must be signed in to change notification settings - Fork 106
99 lines (97 loc) · 3.64 KB
/
build-windows.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
name: Build for Windows
on:
push:
tags:
- "*"
workflow_dispatch:
jobs:
build-x86_64:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: "==2.1.*"
version: "5.15.2"
host: "windows"
target: "desktop"
arch: "win64_mingw81"
tools: "tools_cmake tools_ninja tools_mingw,qt.tools.win64_mingw810"
- name: Setup PATH
run: |
echo $env:Qt5_Dir\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo $env:IQTA_TOOLS\mingw810_64\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: 'x64'
- name: Build Project
run: |
python build-windows.py ${{ runner.workspace }}\Qt 64bit
- name: Add mutool.exe
run: |
Invoke-RestMethod -Uri https://mupdf.com/downloads/archive/mupdf-1.8-windows-x64.zip -OutFile mupdf-release.zip
Expand-Archive -LiteralPath mupdf-release.zip -DestinationPath mupdf-release
Copy-Item .\mupdf-release\**\mutool.exe dist\external
- name: Archive Artifact
run: Compress-Archive dist\* caj2pdf-qt-windows-x86_64-${{ github.ref_name }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: caj2pdf-qt-windows-x86_64-${{ github.ref_name }}.zip
path: caj2pdf-qt-windows-x86_64-${{ github.ref_name }}.zip
- name: Upload to Release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: caj2pdf-qt-windows-x86_64-${{ github.ref_name }}.zip
tags: true
build-x86:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: "==2.1.*"
version: "5.15.2"
host: "windows"
target: "desktop"
arch: "win32_mingw81"
tools: "tools_cmake tools_ninja tools_mingw,qt.tools.win32_mingw810"
- name: Setup PATH
run: |
echo $env:Qt5_Dir\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo $env:IQTA_TOOLS\mingw810_32\bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
architecture: 'x86'
- name: Build Project
run: |
python build-windows.py ${{ runner.workspace }}\Qt 32bit
- name: Add mutool.exe
run: |
Invoke-RestMethod -Uri https://mupdf.com/downloads/archive/mupdf-1.8-windows.zip -OutFile mupdf-release.zip
Expand-Archive -LiteralPath mupdf-release.zip -DestinationPath mupdf-release
Copy-Item .\mupdf-release\**\mutool.exe dist\external
- name: Archive Artifact
run: Compress-Archive dist\* caj2pdf-qt-windows-x86-${{ github.ref_name }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: caj2pdf-qt-windows-x86-${{ github.ref_name }}.zip
path: caj2pdf-qt-windows-x86-${{ github.ref_name }}.zip
- name: Upload to Release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: caj2pdf-qt-windows-x86-${{ github.ref_name }}.zip
tags: true