Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Publishing

Publish your C/C++ projects to GitHub releases.

Prerequisites

  1. GitHub repository configured in porters.toml:
[project]
repository = "https://github.com/username/project"
  1. GitHub Personal Access Token:

Publishing a Release

porters publish --version 1.0.0

With token:

porters publish --version 1.0.0 --token ghp_xxxxx

Or set environment variable:

export GITHUB_TOKEN=ghp_xxxxx
porters publish --version 1.0.0

What Gets Published

  1. Creates Git tag (e.g., v1.0.0)
  2. Builds release binaries
  3. Creates GitHub release
  4. Uploads artifacts:
    • Source tarball
    • Platform-specific binaries
    • porters.toml

Version Management

Semantic Versioning

Follow SemVer:

  • Major (1.0.0): Breaking changes
  • Minor (0.1.0): New features, backward-compatible
  • Patch (0.0.1): Bug fixes

Updating Version

Update in porters.toml:

[project]
version = "1.2.3"

Next Steps