This repository was archived by the owner on Mar 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (95 loc) · 3.31 KB
/
build.yml
File metadata and controls
112 lines (95 loc) · 3.31 KB
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
name: Build & Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
artifact: PDFApps-Windows
- os: ubuntu-22.04
artifact: PDFApps-Linux
- os: macos-latest
artifact: PDFApps-macOS
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# ── Windows ─────────────────────────────────────────────────
- name: Build (Windows)
if: runner.os == 'Windows'
run: |
python -m PyInstaller --noconfirm pdfapps.spec
python -m PyInstaller --noconfirm uninstaller.spec
python -m PyInstaller --noconfirm installer.spec
- name: Upload (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: |
dist/PDFApps.exe
dist/PDFAppsSetup.exe
dist/PDFAppsUninstall.exe
# ── Linux ───────────────────────────────────────────────────
- name: Install Linux system deps
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libegl1 libxkbcommon0 libxcb-cursor0
- name: Build (Linux)
if: runner.os == 'Linux'
run: |
python -m PyInstaller --noconfirm pdfapps.spec
chmod +x dist/PDFApps
tar -czf dist/PDFApps-Linux.tar.gz -C dist PDFApps
- name: Upload (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: dist/PDFApps-Linux.tar.gz
# ── macOS ───────────────────────────────────────────────────
- name: Build (macOS)
if: runner.os == 'macOS'
run: |
python -m PyInstaller --noconfirm pdfapps.spec
chmod +x dist/PDFApps
cd dist && zip -r PDFApps-macOS.zip PDFApps
- name: Upload (macOS)
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: dist/PDFApps-macOS.zip
release:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
artifacts/PDFApps-Windows/PDFAppsSetup.exe
artifacts/PDFApps-Windows/PDFApps.exe
artifacts/PDFApps-Linux/PDFApps-Linux.tar.gz
artifacts/PDFApps-macOS/PDFApps-macOS.zip