-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (126 loc) · 5.22 KB
/
Copy pathrelease.yml
File metadata and controls
156 lines (126 loc) · 5.22 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
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
# ============================================================
# Bulk PDF Generator — GitHub Actions Release Pipeline
# ============================================================
# Triggered by pushing a version tag (e.g. v2.6).
# Builds Windows .exe and macOS .app in parallel, then creates
# a GitHub Release with both binaries attached.
#
# Usage:
# git tag v2.6
# git push origin --tags
# ============================================================
name: Build & Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
# ── Windows .exe build ──────────────────────────────────────
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for _generate_version.py
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Bake version info
run: python _generate_version.py
- name: Build .exe
run: python -m PyInstaller BulkPDFGenerator.spec --clean --noconfirm
- name: Verify build output
run: |
if (!(Test-Path "dist/Bulk PDF Generator.exe")) {
Write-Error "Build failed — .exe not found"
exit 1
}
$size = (Get-Item "dist/Bulk PDF Generator.exe").Length / 1MB
Write-Host "Built: Bulk PDF Generator.exe ($([math]::Round($size, 1)) MB)"
shell: pwsh
- uses: actions/upload-artifact@v4
with:
name: windows-exe
path: dist/Bulk PDF Generator.exe
retention-days: 1
# ── macOS .app build ────────────────────────────────────────
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Bake version info
run: python _generate_version.py
- name: Build .app
run: python -m PyInstaller BulkPDFGenerator_mac.spec --clean --noconfirm
- name: Create .dmg installer
run: |
if [ ! -d "dist/Bulk PDF Generator.app" ]; then
echo "Build failed — .app not found"
exit 1
fi
hdiutil create -volname "Bulk PDF Generator" \
-srcfolder "dist/Bulk PDF Generator.app" \
-ov -format UDZO \
"dist/Bulk.PDF.Generator.macOS.dmg"
SIZE=$(du -h "dist/Bulk.PDF.Generator.macOS.dmg" | cut -f1)
echo "Built: Bulk.PDF.Generator.macOS.dmg ($SIZE)"
- uses: actions/upload-artifact@v4
with:
name: macos-app
path: dist/Bulk.PDF.Generator.macOS.dmg
retention-days: 1
# ── Create GitHub Release ───────────────────────────────────
release:
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: windows-exe
path: artifacts/
- uses: actions/download-artifact@v4
with:
name: macos-app
path: artifacts/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body: |
## ⬇ Download
### 🪟 Windows
**[Bulk.PDF.Generator.exe](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/releases/download/${{ github.ref_name }}/Bulk.PDF.Generator.exe)** — Double-click to run. No installation needed.
> **Windows security prompt:** Windows may show a "Windows protected your PC" screen. This is normal for newly released apps. Click **More info → Run anyway** to proceed.
### 🍎 macOS
**[Bulk.PDF.Generator.macOS.dmg](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/releases/download/${{ github.ref_name }}/Bulk.PDF.Generator.macOS.dmg)** — Open the disk image and drag the app to Applications.
> First time only: right-click the app → Open (macOS security prompt).
---
## What's new in ${{ github.ref_name }}
- **Fixed: "Check for Updates" failing on Mac** — The update checker now works reliably on macOS. Previously it failed with an SSL certificate error because bundled Mac apps couldn't access the system certificate store.
<!-- Add release notes above this line before tagging -->
<details>
<summary>Technical details</summary>
Built by GitHub Actions from commit `${{ github.sha }}`.
</details>
files: |
artifacts/Bulk PDF Generator.exe
artifacts/Bulk.PDF.Generator.macOS.dmg