This guide explains how to create and publish a new release of PTP.
- Go 1.22 or higher installed
- Git configured
- GitHub repository access
# Run the build script
./build-release.sh v0.1.0
# This will create binaries in the dist/ directory:
# - ptp-linux-amd64.tar.gz
# - ptp-darwin-amd64.tar.gz
# - ptp-darwin-arm64.tar.gz
# - checksums.txt# Create and push the tag
git tag -a v0.1.0 -m "Release version 0.1.0"
git push origin v0.1.0- Go to your repository on GitHub
- Click "Releases" → "Create a new release"
- Choose the tag you just created (e.g.,
v0.1.0) - Add release title: "Release v0.1.0"
- Add release notes describing changes
- Upload the built binaries from the
dist/directory:ptp-linux-amd64.tar.gzptp-darwin-amd64.tar.gzptp-darwin-arm64.tar.gzchecksums.txt
- Publish the release
If you've set up GitHub Actions (.github/workflows/release.yml), releases are automated:
-
Create and push a tag:
git tag -a v0.1.0 -m "Release version 0.1.0" git push origin v0.1.0 -
GitHub Actions will automatically:
- Build binaries for all platforms
- Generate checksums
- Create a GitHub release
- Upload all artifacts
-
Check the "Actions" tab in your GitHub repository to monitor the build
- Update version number if needed
- Update CHANGELOG.md (if you have one)
- Test the build script locally
- Create git tag
- Push tag to GitHub
- Create GitHub release (or verify automated release)
- Verify download links work
- Update documentation if needed
Follow Semantic Versioning:
v1.0.0- Major releasev1.1.0- Minor release (new features)v1.1.1- Patch release (bug fixes)
After creating a release, test the download:
# Linux
wget https://github.com/yourusername/php-test-processor/releases/download/v0.1.0/ptp-linux-amd64.tar.gz
tar -xzf ptp-linux-amd64.tar.gz
./ptp-linux-amd64 --version
# macOS
wget https://github.com/yourusername/php-test-processor/releases/download/v0.1.0/ptp-darwin-arm64.tar.gz
tar -xzf ptp-darwin-arm64.tar.gz
./ptp-darwin-arm64 --version