You now have a complete, production-ready solution for building QB64PE projects that:
- Linux (x64) - via Docker
- macOS (x64) - native QB64PE
- Windows (x64) - native QB64PE
All platforms build in parallel using GitHub Actions matrix strategy.
- Tag your code (e.g.,
v1.0.0) - GitHub Actions automatically creates a release
- All platform binaries uploaded to the release
- Release notes auto-generated
Drop this into any QB64PE project's .github/workflows/build.yml:
name: Build My Game
on:
push:
tags: [ 'v*' ]
jobs:
build:
uses: grymmjack/qb64pe-docker/.github/workflows/reusable-build.yml@main
with:
source-file: 'game.bas'
project-name: 'my-awesome-game'jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: macos
- os: windows-latest
platform: windows
steps:
- uses: actions/checkout@v4
- uses: grymmjack/qb64pe-docker@main
with:
source-file: 'src/main.bas'
project-name: 'my-game'
platform: ${{ matrix.platform }}# Build the Docker image
make build
# Compile your program
docker run --rm -v "$(pwd):/workspace" qb64pe:latest -x -w game.bas -o game
# Or use the helper script
./qb64pe-compile.sh workspace/game.basmy-game-lnx-x64.tar.gz- Linux binarymy-game-osx-x64.tar.gz- macOS binarymy-game-win-x64.zip- Windows binary
When you push a tag like v1.0.0:
- GitHub Actions builds all platforms
- Creates a new GitHub Release
- Uploads all binaries to the release
- Generates release notes from commits
Create .github/workflows/build.yml in your QB64PE project:
name: Build and Release
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
jobs:
build:
uses: grymmjack/qb64pe-docker/.github/workflows/reusable-build.yml@main
with:
source-file: 'src/main.bas' # Your main .bas file
project-name: 'my-game' # Your project name
qb64pe-version: 'v4.3.0' # QB64PE versiongit add .github/workflows/build.yml
git commit -m "Add multi-platform build workflow"
git pushgit tag v1.0.0
git push origin v1.0.0Done! Your game is now built for all platforms and released on GitHub! ๐
| Input | Description | Required | Default |
|---|---|---|---|
source-file |
Path to your .bas file | โ Yes | - |
project-name |
Project name for artifacts | โ Yes | - |
qb64pe-version |
QB64PE version | โ No | v4.3.0 |
create-release |
Auto-create releases | โ No | true |
with:
source-file: 'game.bas'
project-name: 'retro-racer'
qb64pe-version: 'v4.2.0' # Use older versionwith:
source-file: 'app.bas'
project-name: 'my-app'
create-release: false # Disable auto-releases- Base: Debian 12 Slim
- Size: ~1.4GB
- Contains: QB64PE v4.3.0 + build tools + runtime libraries
- Built: From QB64PE source via multi-stage build
- Cached: Available at
ghcr.io/grymmjack/qb64pe:v4.3.0
- Downloads official QB64PE releases
- Runs setup scripts
- Compiles natively on each platform
- Pre-compiled QB64PE (faster builds)
- Consistent environment
- Works on any system with Docker
- Easy local development
action.yml- GitHub Action definitionDockerfile- Multi-stage Docker build.github/workflows/reusable-build.yml- Reusable workflow.github/workflows/build-example.yml- Example usage
qb64pe-compile.sh- Local compilation scriptMakefile- Build automationdemo.sh- Demonstration scriptverify.sh- Verification script
README.md- Main documentationdocs/REUSABLE-ACTION.md- Complete guide for using in your projectsQUICKSTART.md- Getting started guideEXAMPLES.md- Usage examplesCONTRIBUTING.md- Contribution guidelines
jobs:
build:
uses: grymmjack/qb64pe-docker/.github/workflows/reusable-build.yml@main
with:
source-file: 'game.bas'
project-name: 'text-adventure'jobs:
build:
uses: grymmjack/qb64pe-docker/.github/workflows/reusable-build.yml@main
with:
source-file: 'src/main.bas' # Main file that includes others
project-name: 'my-rpg'Make sure your main.bas includes other modules:
'$INCLUDE: 'src/player.bi'
'$INCLUDE: 'src/enemy.bi'- Ensure QB64PE version exists: https://github.com/QB64-Phoenix-Edition/QB64pe/releases
- Check network connectivity (downloads QB64PE)
- Use specific version:
qb64pe-version: 'v4.3.0'
- Linux uses pre-built Docker image (fast)
- macOS/Windows download and compile QB64PE (slower, can fail)
- Pin to known-good version
- Test locally first:
make test - Check console output mode for headless builds
- Ensure all included files are in repository
- Version Pinning: Always specify
qb64pe-versionfor reproducible builds - Tag Format: Use semantic versioning:
v1.0.0,v2.1.3,v1.0.0-beta - Testing: Test with
make testbefore pushing - Console Mode: Use
$CONSOLE:ONLYfor CLI programs - File Organization: Keep source in
src/directory - Dependencies: Include all .bi files in repository
Contributions welcome! See CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License. QB64PE is licensed under its own terms.
Made with โค๏ธ for the QB64 community
Ready to use in your projects! Just add the workflow file and start building! ๐