Stack CLI Release Process
Stack CLI Release Process
Overview
The sscli package is published to PyPI via GitHub Actions when a Git tag is pushed to the repository. The workflow is defined in .github/workflows/publish-pip.yml and is triggered only on tags matching the pattern v*.*.* (e.g., v2.0.3).
Prerequisites
- ✅ All code changes committed to
mainin bothfoundry-metaandtooling/stack-clisubmodule - ✅ Version bumped in
tooling/stack-cli/pyproject.toml - ✅ All related submodules updated in
foundry-meta
Release Steps
1. Create a Git Tag (CRITICAL STEP)
The workflow only triggers when a tag is pushed. Without this step, the CI will NOT run.
# Navigate to foundry-meta repocd <foundry-meta-root>
# Create an annotated tag (required by GitHub Actions)git tag -a v2.0.3 -m "Release sscli v2.0.3: Default interactive mode, enhanced UI"
# Push the tag to trigger the workflowgit push origin v2.0.32. Verify the Workflow Runs
- Go to GitHub Actions
- Look for “Publish sscli to PyPI” workflow
- It should start running within a few seconds
- Check logs for any failures
3. Verify PyPI Package
After workflow succeeds, verify the package is available:
# Check PyPIpython -m pip index versions sscli
# Install the new versionpip install sscli==2.0.3Common Issues & Solutions
Problem: Workflow Didn’t Run After Pushing Commits
Root Cause: No tag was created. The workflow triggers only on tag push, not regular commits.
Solution:
git tag -a v2.0.3 -m "Release message"git push origin v2.0.3Problem: Changes Not Visible in Local Testing
Root Cause: After modifying code in tooling/stack-cli, the installed package isn’t updated.
Solution: Rebuild/reinstall the dev package:
# If using sscli-dev swaprm -rf /path/to/sscli-dev/build /path/to/sscli-dev/distpython -m build # Rebuild the dist/
# Or reinstall from sourcecd tooling/stack-clipip install -e . # Development mode install (if supported)# ORpip install --force-reinstall . # Force reinstallProblem: Version in Tag Doesn’t Match pyproject.toml
Solution: Ensure they match exactly:
- Tag:
v2.0.3 - File:
tooling/stack-cli/pyproject.toml→version = "2.0.3"
The GitHub Actions workflow will update this automatically if needed, but consistency is important.
Workflow Details
The publish-pip.yml workflow:
- Trigger: Tag push matching
v*.*.* - Parse Version: Extracts version from tag (e.g.,
v2.0.3→2.0.3) - Update pyproject.toml: Sets version in the file to match tag (automation safety check)
- Build Package: Creates distribution files (wheel, sdist)
- Upload to PyPI: Uses
${{ secrets.PYPI_API_TOKEN }}to publish - Create GitHub Release: Creates a release entry with built artifacts
Environment Variables & Secrets
The workflow uses:
${{ secrets.PYPI_API_TOKEN }}: Required to publish to PyPI${{ secrets.GH_PAT }}: GitHub Personal Access Token (optional fallback for checkouts)
These must be configured in repository settings.
Quick Checklist for Release
- Code changes committed to
mainin both repos - Version bumped in
tooling/stack-cli/pyproject.toml - All submodule pointers updated in
foundry-meta - Create annotated tag:
git tag -a v2.0.X -m "message" - Push tag:
git push origin v2.0.X - Wait for GitHub Actions to complete
- Verify package on PyPI
- Test installation:
pip install sscli==2.0.X
For AI Agents
CRITICAL: Every time you:
- Bump the version, remind user to create a tag before push
- Complete release work, provide the exact
git tagandgit pushcommands - Note in commits: Reference the tag pattern
(feat|fix|chore): msgwithout auto-tagging
The tag creation is a MANUAL STEP that must happen AFTER commits are pushed to main.