How to Publish a Firmware Release
Goal: Tag a versioned firmware release on GitHub, package build artifacts, and publish release notes using the ruckus release workflow.
Prerequisites
A completed
make bitbuild with artifacts inimages/A
releases.yamlfile at the firmware repository root (created in Step 1)A GitHub personal access token with
reposcope set in theGITHUB_TOKENenvironment variablePython packages installed:
pip install gitpython pygithub pyyamlA clean git working tree — uncommitted changes will cause the script to abort
Step 1: Create releases.yaml
Create releases.yaml at the firmware repository root. This file describes what
artifacts to package. The minimum required schema is:
GitBase: firmware
Targets:
MyTarget:
ImageDir: firmware/targets/MyTarget/images
Extensions: [bit, mcs]
Releases:
MyRelease:
Targets: [MyTarget]
Types: [Rogue]
Primary: true
Note
Release names must NOT contain a hyphen (-). The release script rejects names
with hyphens. Use underscores instead (e.g., MyRelease not My-Release).
Schema fields:
GitBase— base directory of the firmware git submodule (usuallyfirmware)Targets— map of build targets; each entry specifies where images live and what file extensions to include in the release archiveReleases— map of release configurations; each entry specifies which targets to package, the archive type, and whether this is the primary release
Release tag format:
Primary release (
Primary: true): tagv1.2.3, archiverogue_v1.2.3.zipNon-primary release: tag
RelName_v1.2.3, archiverogue_RelName_v1.2.3.zip
Step 2: Set the GitHub Token
export GITHUB_TOKEN=ghp_your_token_here
The token must have repo scope to create tags and publish GitHub releases.
Step 3: Run the Release Workflow
make release
This calls scripts/firmwareRelease.py --push interactively. The script prompts for:
Release name — auto-selected if only one release is defined in
releases.yamlBuild base name — enter
latestto auto-select the newest build inimages/Release version — e.g.,
v1.2.3Previous tag — the existing tag used as the starting point for release notes
To generate release files locally without pushing to GitHub (dry run):
make release_files
This runs the same script without the --push flag. The packaged archive and release
notes are written to the local filesystem for inspection.
Safety Checks
The firmwareRelease.py script automatically refuses to publish if any of the
following conditions are true:
The local git repository has uncommitted changes (dirty working tree)
The specified previous tag does not exist locally and remotely
The new version tag already exists (prevents duplicate releases)
Direct Script Invocation (Advanced)
For non-interactive use in CI or scripted workflows:
cd $(RELEASE_DIR)
python3 $(RUCKUS_DIR)/scripts/firmwareRelease.py \
--project=$(TOP_DIR) \
--release=MyRelease \
--build=latest \
--version=v1.2.3 \
--push
All arguments can also be passed via environment variables or combined with
make release overrides.
Troubleshooting
- “Repository is dirty”
Commit or stash all local changes before running
make release. The release script enforces a clean working tree to ensure that tagged releases reflect a known repository state.- “Tag already exists”
Choose a higher version number. Git tags are permanent; do not delete and recreate tags once they have been pushed to GitHub.
- “github.GithubException: 401”
GITHUB_TOKENis not set or has expired. Generate a new token withreposcope at https://github.com/settings/tokens and export it in your shell.- “’-’ in relName”
Rename your release in
releases.yaml. Hyphens are not permitted in release names. ReplaceMy-ReleasewithMyReleaseorMy_Release.