This document describes how to create releases for StreamLib.
Releases are fully automated via GitHub Actions. When you push a version tag (e.g., v0.1.0), the workflow automatically:
- Creates a GitHub release
- Builds binaries for all platforms
- Packages everything with dependencies
- Uploads release assets
Each release includes:
streamio-X.Y.Z-source.tar.gz- Source archive (gzip)streamio-X.Y.Z-source.zip- Source archive (zip)
streamio-X.Y.Z-windows-x64-static.zip- Static library (.lib) with all dependenciesstreamio-X.Y.Z-windows-x64-dll.zip- DLL build with all runtime DLLs included
Windows static package includes:
stream.lib- Main library- All dependency .lib files (zlib, bzip2, lzma, zstd, libarchive)
- Headers
- Examples
- Documentation
Windows DLL package includes:
stream.dll+stream.lib- Main library- All dependency DLLs (zlib1.dll, bz2.dll, lzma.dll, zstd.dll, archive.dll, etc.)
- Headers
- Examples
- Documentation
streamio-X.Y.Z-linux-x64.tar.gz- Static library (libstream.a)- Requires system libraries: zlib, bzip2, liblzma, libzstd, libarchive
- Install deps:
sudo apt-get install zlib1g-dev libbz2-dev liblzma-dev libzstd-dev libarchive-dev
streamio-X.Y.Z-macos-x64.tar.gz- Static library (libstream.a)- Requires Homebrew libraries: zlib, bzip2, xz, zstd, libarchive
- Install deps:
brew install zlib bzip2 xz zstd libarchive
# Make sure you're on the main branch with latest changes
git checkout main
git pull
# Run the release script
./scripts/release.sh 0.1.0
# Review the changes, then push
git push origin main v0.1.0The script will:
- Validate version format
- Check working directory is clean
- Update version in CMakeLists.txt
- Commit the version change
- Create a git tag
- Show instructions for pushing
# 1. Update version in CMakeLists.txt
sed -i 's/^project(streamio VERSION .*/project(streamio VERSION 0.1.0)/' CMakeLists.txt
# 2. Commit the version change
git add CMakeLists.txt
git commit -m "Release v0.1.0"
# 3. Create and push tag
git tag -a v0.1.0 -m "Release v0.1.0"
git push origin main v0.1.0You can also trigger a release manually from GitHub:
- Go to Actions tab
- Select "Release Build" workflow
- Click "Run workflow"
- Enter version (e.g.,
0.1.0) - Click "Run workflow"
This is useful for rebuilding releases without creating a new tag.
Once you push the tag, GitHub Actions will:
-
Create Release Job (~30 seconds)
- Creates GitHub release draft
- Generates release notes
-
Build Jobs (run in parallel, ~10-15 minutes total)
- Windows Static: Builds static .lib with vcpkg dependencies
- Windows DLL: Builds DLL with all runtime dependencies
- Linux: Builds static library
- macOS: Builds static library
- Source: Creates source archives
-
Upload Assets (automatic)
- All packages uploaded to the release
- Release published automatically
Watch the build progress:
# Open in browser
https://github.com/YOUR_USERNAME/streamiolib/actions
# Or use GitHub CLI
gh run list --workflow=release.yml
gh run watchBefore creating a release:
- All tests passing (
ctestin build directory) - CI/CD pipeline green (check GitHub Actions)
- CHANGELOG updated with new features/fixes
- README updated if API changed
- Version bumped appropriately:
- Major: Breaking API changes (X.0.0)
- Minor: New features, backwards compatible (0.X.0)
- Patch: Bug fixes, backwards compatible (0.0.X)
- No uncommitted changes
- On main branch
StreamLib follows Semantic Versioning:
-
0.x.y - Pre-1.0 releases (current phase)
- Breaking changes allowed in minor versions
- Use for initial development
-
1.0.0 - First stable release
- API considered stable
- Breaking changes only in major versions
vcpkg dependency issues:
# Check vcpkg cache in Actions logs
# vcpkg will auto-cache dependencies between runs
# If cache is corrupted, manually clear it via Actions cache settingsMissing DLLs in package:
- Check the Copy-Item commands in
.github/workflows/release.yml - DLL names may vary between vcpkg versions
- Look in vcpkg installed directory for actual names
Missing dependencies:
- Check apt-get/brew install commands in workflow
- Ensure all required libraries are listed
Wrong tag format:
- Must start with
v(e.g.,v0.1.0, not0.1.0) - Use script to ensure correct format
Permission denied:
- Ensure GITHUB_TOKEN has write permissions
- Check repository settings → Actions → General → Workflow permissions
Upload timeout:
- Large packages may timeout on slow runners
- Windows DLL packages are largest (~50MB)
- Workflow will retry automatically
Wrong file path:
- Check package directory names match upload globs
- Verify files are created in correct location
If you need to delete a release:
# Delete the release on GitHub
gh release delete v0.1.0
# Delete the tag locally and remotely
git tag -d v0.1.0
git push origin :refs/tags/v0.1.0
# Revert the version commit
git revert HEAD
git push origin mainBefore pushing a tag, you can test packaging locally:
# Build
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
cmake --build build --config Release
# Package (adapt from workflow)
$VERSION = "0.1.0-test"
$PKG_DIR = "streamio-${VERSION}-windows-x64-test"
New-Item -ItemType Directory -Force -Path "${PKG_DIR}/include"
# ... (copy files as in workflow)
Compress-Archive -Path "${PKG_DIR}" -DestinationPath "${PKG_DIR}.zip"# Build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
# Package
VERSION="0.1.0-test"
PKG_DIR="streamio-${VERSION}-linux-x64-test"
mkdir -p ${PKG_DIR}/{include,lib,examples}
cp -r include/* ${PKG_DIR}/include/
cp build/libstream.a ${PKG_DIR}/lib/
tar czf ${PKG_DIR}.tar.gz ${PKG_DIR}/v0.1.0 - Initial release
- Core stream functionality
- Compression support (gzip, bzip2, xz, zstd)
- Archive support (read/write)
- Path walker
v0.2.0 - Feature additions (example)
- New compression formats
- Performance improvements
- Additional archive formats
v1.0.0 - Stable release (example)
- API freeze
- Production ready
- Full documentation
- Complete test coverage