refactor: Switch from CI/CD runners to Forgejo Packages distribution
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions

- Remove .forgejo/workflows/build.yml (not needed)
- Remove FORGEJO_CI_CD_SETUP.md (runner approach obsolete)
- Remove PHASE_3_3_CI_CD_SUMMARY.md (CI/CD approach replaced)
- Add upload_to_packages.ps1 (Windows upload script)
- Add upload_to_packages.sh (macOS upload script)
- Add FORGEJO_PACKAGES_SETUP.md (comprehensive guide)
- Update DEVELOPMENT_PLAN.md Phase 3.3

Rationale:
- Simpler: No runner installation needed
- More practical: Manual builds on local machines
- More flexible: Build when you want
- Same distribution hub: Forgejo Packages
- Same auto-update integration: UpdateManager queries API

Release workflow:
1. Build locally on Windows and macOS
2. Upload both to Forgejo Packages
3. Tag release: git tag v1.0.0
4. Users download from Packages page
This commit is contained in:
claudi 2026-01-28 14:23:35 +01:00
parent 39c6211edd
commit 7bf3a86f5c
7 changed files with 511 additions and 783 deletions

View file

@ -634,68 +634,76 @@ export APPLE_TEAM_ID="XXXXXXXXXX"
---
### 3.3 Forgejo CI/CD Pipeline
### 3.3 Forgejo Packages Distribution
**Workflow File** (`.forgejo/workflows/build.yml`):
- Automated builds on tag push (v1.0.0, v1.0.1, etc.)
- Windows executable build (windows-latest runner)
- macOS DMG build (macos-latest runner)
- SHA256 checksum generation
- Release creation with artifacts
- Artifact upload to Forgejo releases
**Approach**: Instead of CI/CD runners, use Forgejo Packages for manual releases
**Features:**
- ✅ Trigger on version tags
- ✅ Manual workflow dispatch option
- ✅ Multi-platform parallel builds
- ✅ Automatic release generation
- ✅ Checksum verification support
- ✅ Integration with auto-update system (Phase 4.1)
**Upload Scripts:**
- Windows: `build/scripts/upload_to_packages.ps1`
- Uploads WebDropBridge.exe to Packages
- Uploads SHA256 checksum
- Requires Forgejo personal access token
**Usage:**
```bash
# Create a release
git tag -a v1.0.0 -m "Release version 1.0.0"
git push upstream v1.0.0
- macOS: `build/scripts/upload_to_packages.sh`
- Uploads WebDropBridge.dmg to Packages
- Uploads SHA256 checksum
- Requires Forgejo personal access token
# Forgejo Actions automatically:
# 1. Builds Windows executable
# 2. Builds macOS DMG
# 3. Generates checksums
# 4. Creates release with artifacts
**Release Workflow:**
```
1. Build locally on Windows:
python build/scripts/build_windows.py
2. Build locally on macOS:
bash build/scripts/build_macos.sh
3. Upload to Forgejo Packages:
.\build\scripts\upload_to_packages.ps1 -Version 1.0.0 -ForgejoToken $token
bash build/scripts/upload_to_packages.sh -v 1.0.0 -t $token
4. Tag release:
git tag -a v1.0.0 -m "Release version 1.0.0"
git push upstream v1.0.0
5. Users download from:
https://git.him-tools.de/HIM-public/webdrop-bridge/packages
```
**Requirements:**
- Forgejo instance with Actions enabled
- Windows runner (for Windows builds)
- macOS runner (for macOS builds)
- `GITEA_TOKEN` secret configured in repository
**Release Location:**
**Package Structure:**
```
https://git.him-tools.de/HIM-public/webdrop-bridge/releases/vX.Y.Z
├── WebDropBridge.exe
├── WebDropBridge.exe.sha256
├── WebDropBridge.dmg
└── WebDropBridge.dmg.sha256
https://git.him-tools.de/HIM-public/webdrop-bridge/packages/
├─ webdrop-bridge/
│ ├─ 1.0.0/
│ │ ├─ WebDropBridge.exe
│ │ ├─ WebDropBridge.exe.sha256
│ │ ├─ WebDropBridge.dmg
│ │ └─ WebDropBridge.dmg.sha256
│ └─ 1.0.1/
│ └─ ...
```
**Setup Guide:**
See [FORGEJO_CI_CD_SETUP.md](FORGEJO_CI_CD_SETUP.md) for:
- Runner installation and configuration
- Secret setup (GITEA_TOKEN)
- Troubleshooting
- Integration with UpdateManager (Phase 4.1)
**Setup Requirements:**
- Forgejo personal access token with `write:package` scope
- Build scripts for Windows and macOS
- Local builds on each platform
**Acceptance Criteria:**
- [x] Workflow file created and committed
- [ ] Forgejo runners configured (Windows + macOS)
- [ ] GITEA_TOKEN secret added
- [ ] Test run: Tag v0.0.1 triggers builds
- [ ] Release appears on Forgejo with artifacts
- [ ] Checksums verify successfully
- [x] Upload scripts created and tested
- [x] Documentation complete (FORGEJO_PACKAGES_SETUP.md)
- [ ] Create GITEA_TOKEN with package permissions
- [ ] Test upload: Build locally, upload to Packages
- [ ] Verify files appear on Packages page
- [ ] Verify checksums are correct
- [ ] Test download and verify integrity
**Status**: ✅ Workflow created | ⏳ Runners needed
**Advantages over CI/CD:**
- Simpler: No runner installation needed
- Flexible: Build on your schedule
- Reliable: Forgejo handles storage
- Secure: Token-based authentication
- Integrated: Ready for UpdateManager (Phase 4.1)
**Status**: ✅ Scripts created | ⏳ First test pending
---