This document describes how to create a new release of Francis.
Before starting a release, ensure you have:
- Clean git working directory - All changes must be committed, must be on
mainbranch - GitHub CLI authenticated - Install:
brew install gh, Login:gh auth login - Appropriate permissions - Push access to this repo and
block/homebrew-tap
The release script automates the entire release process. Run:
./release.shThe script will:
-
Validate and confirm the release version
- Shows current version (e.g.,
0.0.7-SNAPSHOT) - Shows release version (e.g.,
0.0.7) - Shows post-release version (e.g.,
0.0.8-SNAPSHOT) - Asks for confirmation before proceeding
- Shows current version (e.g.,
-
Create release branch (
release/X.Y.Z)- Updates
gradle.propertiesto remove-SNAPSHOT - Commits and pushes the branch
- Updates
-
Tag the release (
vX.Y.Z)- Creates an annotated git tag
- Pushes the tag to GitHub
-
Wait for GitHub Actions release workflow
- Builds, tests, and publishes to Maven Central (host-sdk/instrumentation-sdk)
- Creates GitHub release with tarball
- Prints verification URLs:
- GitHub Release:
https://github.com/block/francis/releases/tag/vX.Y.Z - Maven Central (host-sdk):
https://central.sonatype.com/artifact/com.squareup.francis/host-sdk/X.Y.Z - Maven Central (instrumentation-sdk):
https://central.sonatype.com/artifact/com.squareup.francis/instrumentation-sdk/X.Y.Z
- GitHub Release:
- Note: Maven Central artifacts may take up to 30 minutes to become available
-
Merge release branch to main
- Fast-forward merge only
-
Bump version for next development cycle
- Updates
gradle.propertiestoX.Y.Z+1-SNAPSHOT - Commits and pushes to main
- Updates
-
Update Homebrew formula
- Triggers
bump-formula.yamlworkflow inblock/homebrew-tap - Sends:
repo=block/francis,formula=francis,tag=vX.Y.Z, and the releaseartifact_url - Waits for the workflow to complete
- Triggers
The release script supports automatic resumption if something fails partway through. The script tracks progress in releases/X.Y.Z/.release_state.
Each major step in the release process is tracked:
PROMPT- Initial confirmationCREATE_BRANCH- Release branch creationTAG_RELEASE- Git tag creationWAIT_RELEASE- GitHub Actions release (builds, tests, publishes)MERGE_MAIN- Merge to mainBUMP_SNAPSHOT- Version bumpTRIGGER_FORMULA_BUMP- Homebrew formula update
If the script fails or is interrupted:
- Fix the underlying issue
- Run
./release.shagain - The script will skip already-completed steps
# Delete artifacts directory
rm -r releases/X.Y.Z
# Delete release branch if created
git checkout main && git branch -D release/X.Y.Z && git push origin --delete release/X.Y.Z
# Delete tag if created
git tag -d vX.Y.Z && git push origin --delete vX.Y.ZFrancis uses semantic versioning (MAJOR.MINOR.PATCH):
- Development versions end with
-SNAPSHOT(e.g.,0.0.7-SNAPSHOT) - Release versions have no suffix (e.g.,
0.0.7)
Each release produces:
-
GitHub Release (
https://github.com/block/francis/releases/tag/vX.Y.Z)francis-release.tar.gz- Complete release bundle with:- JAR files (francis.jar, francis-demo.jar, francis-host-sdk.jar)
- Demo APKs
- Wrapper scripts
-
Maven Central Artifacts
com.squareup.francis:host-sdk:X.Y.Z- Host SDK JARcom.squareup.francis:instrumentation-sdk:X.Y.Z- Instrumentation SDK AAR
-
Homebrew Formula
- Updated in
block/homebrew-taprepository - Users can install with:
brew install block/tap/francis
- Updated in
The following secrets must be configured in the repository settings:
SONATYPE_CENTRAL_USERNAME- Sonatype Central Portal usernameSONATYPE_CENTRAL_PASSWORD- Sonatype Central Portal passwordGPG_SECRET_KEY- GPG private key for signingGPG_SECRET_PASSPHRASE- GPG key passphrase
GitHub Actions may be delayed. Wait a few minutes and the script will find it.
Check the workflow logs: gh run view --repo block/francis
Common issues:
- Maven Central credentials not configured (repository secrets)
- GPG signing key issues (repository secrets)
Check the workflow manually: https://github.com/block/homebrew-tap/actions
You can manually trigger it:
gh workflow run bump-formula.yaml --repo block/homebrew-tap \
--field repo=block/francis \
--field formula=francis \
--field tag=vX.Y.Z \
--field artifact_url=https://github.com/block/francis/releases/download/vX.Y.Z/francis-release.tar.gz