File: .github/workflows/build.yml
This GitHub Actions workflow will automatically build your desktop app for Windows, macOS, and Linux whenever you push a new version tag.
-
Windows (runs on Windows server)
- Builds
.exeinstaller - No code signing (same as your local build)
- Builds
-
macOS (runs on macOS server)
- Builds
.dmginstaller - No code signing (CSC_IDENTITY_AUTO_DISCOVERY disabled)
- Builds
-
Linux (runs on Ubuntu server)
- Builds
.AppImage,.deb, and.rpm - Works on all major distros
- Builds
- Pushing a version tag (e.g.,
v1.0.0) - Manual trigger via GitHub UI
cd d:\FileShot.io\desktop-app
# Initialize git (if not already)
git init
# Add remote (replace with your repo URL)
git remote add origin https://github.com/yourusername/fileshot-desktop.git
# Add all files
git add .
# Commit
git commit -m "Initial desktop app commit"
# Push to GitHub
git push -u origin mainThe .github/workflows/build.yml file I created will be pushed with your code. GitHub will automatically detect it.
# Tag your current version
git tag v1.0.0
# Push the tag
git push origin v1.0.0That's it! GitHub Actions will automatically:
- Build Windows installer
- Build macOS installer
- Build Linux installers
- Create a GitHub Release with all files attached
- Go to your repo:
https://github.com/yourusername/fileshot-desktop/releases - Find your release (e.g.,
v1.0.0) - Download the installers:
FileShot-Setup-1.0.0.exe(Windows)FileShot-1.0.0.dmg(macOS)FileShot-1.0.0.AppImage(Linux)FileShot-1.0.0.deb(Debian/Ubuntu)FileShot-1.0.0.rpm(Fedora/RedHat)
- Go to Actions tab in your repo
- Click on the workflow run
- Download artifacts from each job
- GitHub Actions is free for public repositories
- 2,000 minutes/month free for private repos
- Each build takes ~5-10 minutes
- You can do 200+ builds per month for free
✅ No need for Mac - GitHub provides macOS runners ✅ No need for Linux VM - GitHub provides Ubuntu runners ✅ Consistent builds - Same environment every time ✅ Automatic releases - Files uploaded to GitHub automatically ✅ Version control - Every build is tagged and tracked
✅ Saves hours - No switching between systems ✅ No setup - No VMs, no dual boot, no remote machines ✅ Parallel builds - All 3 platforms build simultaneously ✅ Professional - Industry-standard CI/CD
Change this in build.yml:
on:
push:
branches: [main] # Build on every push to main
workflow_dispatch:When you get certificates, add secrets to GitHub:
- Go to repo Settings → Secrets
- Add
CSC_LINK(certificate file base64) - Add
CSC_KEY_PASSWORD(certificate password) - Update workflow to use them
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Change to 20 if needed- ✅ Push code to GitHub
- ✅ Create
v1.0.0tag - ✅ Wait 10-15 minutes for builds
- ✅ Download all installers from Releases
- Upload installers to your server
- Update desktop.html with download links
- Remove "Coming Soon" from Mac/Linux
- Announce cross-platform support!
- Add code signing certificates
- Set up auto-updates
- Add build notifications (Slack/Discord)
- Add automated testing
- Check Actions tab for error logs
- Most common: Missing dependencies in package.json
- Fix: Add missing packages and push again
- Usually code signing issues
- Solution: Keep
CSC_IDENTITY_AUTO_DISCOVERY: false
- Usually missing system dependencies
- Solution: Add to workflow:
- name: Install Linux dependencies run: sudo apt-get install -y libgtk-3-0 libnotify4
GitHub Actions gives you:
- ✅ Free cross-platform builds
- ✅ No need for Mac or Linux machines
- ✅ Automatic releases
- ✅ Professional CI/CD pipeline
Time to first cross-platform release: ~20 minutes
Just push your code, create a tag, and let GitHub do the work!