Skip to content

Commit f1a6ede

Browse files
committed
merge: bring in GitHub CI workflow and README/CLAUDE.md updates from github/main
2 parents 3d48490 + 3cb7425 commit f1a6ede

3 files changed

Lines changed: 153 additions & 55 deletions

File tree

.github/workflows/release.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# ============================================================
2+
# Bulk PDF Generator — GitHub Actions Release Pipeline
3+
# ============================================================
4+
# Triggered by pushing a version tag (e.g. v2.6).
5+
# Builds Windows .exe and macOS .app in parallel, then creates
6+
# a GitHub Release with both binaries attached.
7+
#
8+
# Usage:
9+
# git tag v2.6
10+
# git push origin --tags
11+
# ============================================================
12+
13+
name: Build & Release
14+
15+
on:
16+
push:
17+
tags:
18+
- 'v*'
19+
20+
permissions:
21+
contents: write
22+
23+
jobs:
24+
# ── Windows .exe build ──────────────────────────────────────
25+
build-windows:
26+
runs-on: windows-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0 # Full history for _generate_version.py
31+
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: '3.10'
35+
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install -r requirements.txt
40+
pip install pyinstaller
41+
42+
- name: Bake version info
43+
run: python _generate_version.py
44+
45+
- name: Build .exe
46+
run: python -m PyInstaller BulkPDFGenerator.spec --clean --noconfirm
47+
48+
- name: Verify build output
49+
run: |
50+
if (!(Test-Path "dist/Bulk PDF Generator.exe")) {
51+
Write-Error "Build failed — .exe not found"
52+
exit 1
53+
}
54+
$size = (Get-Item "dist/Bulk PDF Generator.exe").Length / 1MB
55+
Write-Host "Built: Bulk PDF Generator.exe ($([math]::Round($size, 1)) MB)"
56+
shell: pwsh
57+
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: windows-exe
61+
path: dist/Bulk PDF Generator.exe
62+
retention-days: 1
63+
64+
# ── macOS .app build ────────────────────────────────────────
65+
build-macos:
66+
runs-on: macos-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
fetch-depth: 0
71+
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: '3.10'
75+
76+
- name: Install dependencies
77+
run: |
78+
python -m pip install --upgrade pip
79+
pip install -r requirements.txt
80+
pip install pyinstaller
81+
82+
- name: Bake version info
83+
run: python _generate_version.py
84+
85+
- name: Build .app
86+
run: python -m PyInstaller BulkPDFGenerator_mac.spec --clean --noconfirm
87+
88+
- name: Verify and zip .app bundle
89+
run: |
90+
if [ ! -d "dist/Bulk PDF Generator.app" ]; then
91+
echo "Build failed — .app not found"
92+
exit 1
93+
fi
94+
cd dist
95+
zip -r "Bulk.PDF.Generator.macOS.zip" "Bulk PDF Generator.app"
96+
SIZE=$(du -h "Bulk.PDF.Generator.macOS.zip" | cut -f1)
97+
echo "Built: Bulk.PDF.Generator.macOS.zip ($SIZE)"
98+
99+
- uses: actions/upload-artifact@v4
100+
with:
101+
name: macos-app
102+
path: dist/Bulk.PDF.Generator.macOS.zip
103+
retention-days: 1
104+
105+
# ── Create GitHub Release ───────────────────────────────────
106+
release:
107+
needs: [build-windows, build-macos]
108+
runs-on: ubuntu-latest
109+
steps:
110+
- uses: actions/checkout@v4
111+
with:
112+
fetch-depth: 0
113+
114+
- uses: actions/download-artifact@v4
115+
with:
116+
name: windows-exe
117+
path: artifacts/
118+
119+
- uses: actions/download-artifact@v4
120+
with:
121+
name: macos-app
122+
path: artifacts/
123+
124+
- name: Create GitHub Release
125+
uses: softprops/action-gh-release@v2
126+
with:
127+
generate_release_notes: true
128+
files: |
129+
artifacts/Bulk PDF Generator.exe
130+
artifacts/Bulk.PDF.Generator.macOS.zip

CLAUDE.md

Lines changed: 18 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ A Python desktop app (tkinter/ttkbootstrap GUI) that batch-fills PDF forms from
2323

2424
| | |
2525
|---|---|
26-
| **Primary (origin)** | `https://gitlab.com/davearmswork/bulk-pdf-extractor-and-generator.git` |
27-
| **Mirror (github)** | `https://github.com/mrdavearms/bulk-pdf-extractor-and-generator.git` (suspension resolved March 2026) |
28-
| **GitLab user** | `dave401` |
29-
| **glab CLI** | Authenticated, v1.86.0+ |
26+
| **Primary (origin)** | `https://github.com/mrdavearms/bulk-pdf-extractor-and-generator.git` |
27+
| **Backup (gitlab)** | `https://gitlab.com/davearmswork/bulk-pdf-extractor-and-generator.git` |
28+
| **CI/CD** | GitHub Actions (`.github/workflows/release.yml`) |
3029

3130
## Source Files
3231

@@ -64,71 +63,38 @@ A Python desktop app (tkinter/ttkbootstrap GUI) that batch-fills PDF forms from
6463

6564
## Release Workflow
6665

67-
Releases go to **GitLab Releases** (primary) and **GitHub Releases** (mirror). The `.exe` is NOT committed to git (`dist/` is in `.gitignore`).
66+
Releases are built by **GitHub Actions** and published to **GitHub Releases**. The `.exe` and `.app` are NOT committed to git (`dist/` is in `.gitignore`).
6867

6968
**GitHub compliance rule**: never link directly to binary assets (`.exe`, `.dmg`) in the README — link to the Releases *page* only. Direct binary links triggered GitHub's storage-abuse detection and caused account suspension.
7069

71-
### Quick release
70+
### Automated release (GitHub Actions)
7271

7372
```bash
74-
./release.sh v2.X
75-
```
76-
77-
This script automates: version baking, PyInstaller build, git tag + push, GitLab Release creation, `.exe` upload + linking, and README badge update.
78-
79-
### Manual release (if the script breaks)
80-
81-
```bash
82-
# 1. Build
83-
python _generate_version.py
84-
python -m PyInstaller BulkPDFGenerator.spec --clean
85-
86-
# 2. Tag and push
8773
git tag v2.X
88-
git push origin main --tags
89-
90-
# 3. Create release
91-
glab release create v2.X --name "Bulk PDF Generator v2.X" --notes "Release notes"
92-
93-
# 4. Upload exe (glab has a bug with direct file uploads, use curl)
94-
TOKEN=$(glab auth status --show-token 2>&1 | grep "Token found" | sed 's/.*Token found: //')
95-
curl --request POST --header "PRIVATE-TOKEN: $TOKEN" \
96-
--form "file=@dist/Bulk PDF Generator.exe" \
97-
"https://gitlab.com/api/v4/projects/davearmswork%2Fbulk-pdf-extractor-and-generator/uploads"
98-
99-
# 5. Link the upload to the release (use full_path from step 4 JSON response)
100-
curl --request POST --header "PRIVATE-TOKEN: $TOKEN" \
101-
--header "Content-Type: application/json" \
102-
--data '{"name":"Bulk.PDF.Generator.exe","url":"https://gitlab.com<FULL_PATH>","filepath":"/binaries/Bulk.PDF.Generator.exe","link_type":"other"}' \
103-
"https://gitlab.com/api/v4/projects/davearmswork%2Fbulk-pdf-extractor-and-generator/releases/v2.X/assets/links"
104-
105-
# 6. Update README badge version and push
74+
git push origin --tags
75+
```
10676

107-
# 7. Push to GitHub mirror
108-
git push github main --tags
77+
This triggers `.github/workflows/release.yml` which:
78+
1. Builds Windows `.exe` on `windows-latest` using `BulkPDFGenerator.spec`
79+
2. Builds macOS `.app` on `macos-latest` using `BulkPDFGenerator_mac.spec` (zipped as `Bulk.PDF.Generator.macOS.zip`)
80+
3. Creates a GitHub Release with auto-generated notes and both binaries attached
10981

110-
# 8. Create GitHub release (link to GitLab for the binary — no direct .exe links)
111-
gh release create v2.X \
112-
--repo mrdavearms/bulk-pdf-extractor-and-generator \
113-
--title "Bulk PDF Generator v2.X" \
114-
--notes "Release notes. Download the Windows .exe from [GitLab Releases](https://gitlab.com/davearmswork/bulk-pdf-extractor-and-generator/-/releases/v2.X)."
115-
```
82+
The README download badge version still needs updating manually after a release.
11683

117-
### Known quirks
84+
### Legacy local release (fallback)
11885

119-
- `glab release create` with file arguments fails with "Filepath is in an invalid format" — this is a glab CLI bug. Use the curl two-step (upload then link) as a workaround.
120-
- GitLab project uploads go to `/-/project/<id>/uploads/<hash>/filename` — the `full_path` from the upload response is what you pass to the asset link.
121-
- The README download badge is a static shields.io badge (not dynamic) — the version must be updated manually in `README.md` after each release (the release script handles this).
86+
`release.sh` still exists for local builds if needed. It builds the Windows `.exe` locally, creates a GitLab Release, and uploads the binary. Use the GitHub Actions workflow instead for normal releases.
12287

12388
## Cross-Platform Build
12489

125-
- **Windows .exe**: Build on Windows with `python -m PyInstaller BulkPDFGenerator.spec --clean`. Output: `dist/Bulk PDF Generator.exe`.
126-
- **macOS .app**: Must build on macOS. PyInstaller cannot cross-compile. Clone repo on Mac, install deps, run PyInstaller.
90+
Both platforms are built automatically by GitHub Actions. For local builds:
91+
- **Windows .exe**: `python -m PyInstaller BulkPDFGenerator.spec --clean``dist/Bulk PDF Generator.exe`
92+
- **macOS .app**: `python -m PyInstaller BulkPDFGenerator_mac.spec --clean``dist/Bulk PDF Generator.app`
12793
- **Linux**: Run from source. No packaging currently set up.
12894

12995
## Git LFS
13096

131-
**Not used and not needed.** The `.exe` is distributed via GitLab Releases (file hosting), not stored in git history. The `.gitignore` excludes `dist/` and `build/`. The only binaries tracked in git are small PNGs (icon, app visualisation).
97+
**Not used and not needed.** Binaries are distributed via GitHub Releases, not stored in git history. The `.gitignore` excludes `dist/` and `build/`. The only binaries tracked in git are small PNGs (icon, app visualisation).
13298

13399
## Field Data Types
134100

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@
44

55
**Batch-fill PDF forms from spreadsheet data — turning hours of manual data entry into a single click.**
66

7-
[![Latest Release](https://img.shields.io/badge/latest-v2.5.5-0078d4?style=for-the-badge)](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/releases/latest)
7+
[![Latest Release](https://img.shields.io/github/v/release/mrdavearms/bulk-pdf-extractor-and-generator?style=for-the-badge&color=0078d4)](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/releases/latest)
88

9-
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-0078d4?logo=windows&logoColor=white)](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/releases)
9+
[![Build](https://img.shields.io/github/actions/workflow/status/mrdavearms/bulk-pdf-extractor-and-generator/release.yml?logo=github&label=build)](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/actions/workflows/release.yml)
10+
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS-0078d4?logo=windows&logoColor=white)](https://github.com/mrdavearms/bulk-pdf-extractor-and-generator/releases)
1011
[![License](https://img.shields.io/badge/license-MIT-22c55e)](LICENSE)
1112
[![Python](https://img.shields.io/badge/python-3.10%2B-3b82f6?logo=python&logoColor=white)](https://python.org)
1213

1314
</div>
1415

1516
---
1617

17-
Originally built to streamline VCAA Special Examination Arrangements Evidence Application forms, but works with **any** PDF form — TAFE enrolments, leave applications, compliance forms, consent forms, and more.
18+
Originally built to streamline VCAA Special Examination Arrangements Evidence Application forms, but works with **any** PDF form — TAFE enrolments, leave applications, compliance forms, consent forms, and more. The app examines the PDF for any fillable form fields, seeks confirmation and changes and then generates an Excel file
19+
for you to fill in content. Then use that Excel data to fill in the form in bulk at high speed. Massive time saver if used well.
1820

1921
> [!NOTE]
2022
> A Principal-developed app for educators and school leaders. Always review all generated outputs before use.

0 commit comments

Comments
 (0)