// Create GitHub Actions workflows for automated package building and distribution. Use in package phase to automate .mojopkg building and release creation.
| name | ci-package-workflow |
| description | Create GitHub Actions workflows for automated package building and distribution. Use in package phase to automate .mojopkg building and release creation. |
| mcp_fallback | none |
| category | ci |
Create GitHub Actions workflows for automated packaging.
name: Build Packages
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Packages
run: ./scripts/build_all_packages.sh
- uses: softprops/action-gh-release@v1
with:
files: packages/*.mojopkg
on:
push:
tags:
- 'v*.*.*' # Semantic versioning
workflow_dispatch: # Manual trigger
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Mojo
run: # Install Mojo environment
- name: Build Packages
run: ./scripts/build_all_packages.sh
- name: Create Release
uses: softprops/action-gh-release@v1
Automatically build when version tag created:
on:
push:
tags:
- 'v*'
Validate packaging on pull requests:
on:
pull_request:
paths:
- 'src/**'
- 'scripts/build_*.sh'
Allow on-demand builds with parameters:
on:
workflow_dispatch:
inputs:
version:
description: 'Version to build'
required: true
| Error | Fix |
|---|---|
| Action version invalid | Use latest stable version (v4, not @main) |
| Missing environment | Add setup step before build |
| Build script not found | Verify script path and permissions |
| Artifact not uploaded | Check build produces expected files |
ci-validate-workflow for syntax validation.github/workflows/