-
Pull a fresh copy of
origin/mainand tags.git fetch --tags
-
Create a release branch off of
origin/main(e.g.release-v0.1). (If this is a patch release, re-use the existing release branch if it still exists, or else check out a new one from the appropriate tag.)git co -b release-v0.1 origin/main
-
Confirm that the kotlin build is green before committing any changes. Takes about three minutes on an M3 Macbook Pro. (Note we exclude benchmarks, but you can check those too!)
./gradlew build && ./gradlew connectedCheck -x :benchmarks:dungeon-benchmark:connectedCheck -x :benchmarks:performance-poetry:complex-benchmark:connectedCheck -x :benchmarks:performance-poetry:complex-poetry:connectedDebugAndroidTest -x :samples:todo-android:app:connectedDebugAndroidTest -x :benchmarks:runtime-microbenchmark:connectedAndroidTestNOTE: If you have any unexpected errors in the build or tests and they are related to non-jvm targets you may need to update your XCode or other iOS tools. See note in the workflow-core and workflow-runtime modules. Alternatively you can specify only the target you care about (while developing - do not do this for actual releases) with the property
workflow.targetswhich is set to any ofkmp,jvm,ios, orjs. -
In
gradle.properties, remove the-SNAPSHOTsuffix from theVERSION_NAMEproperty. E.g.VERSION_NAME=0.1.0 -
Create a commit and tag the commit with the version number:
git commit -am "Releasing v0.1.0." git tag v0.1.0 -
Push the release branch and tag to the repository:
git push -u --tags
-
Run the
Publish Releaseaction in the GitHub Actions page by clicking "run workflow" on the right. Select the appropriate tag. -
Wait for that publishing job to succeed.
-
Back on your local machine, bump the version
- Kotlin: Update the
VERSION_NAMEproperty ingradle.propertiesto the new snapshot version, e.g.VERSION_NAME=0.2.0-SNAPSHOT. - Kotlin: Update the
LAST_PUBLISHED_VERSION_NAMEproperty ingradle.propertiesto the new version you just published, e.g.LAST_PUBLISHED_VERSION_NAME=0.1.0.
- Kotlin: Update the
-
Commit the new snapshot version:
git commit -am "Finish releasing v0.1.0." -
Push your release branch again:
git push origin release-v0.1
-
Merge the release branch into main and push again:
git co main git reset --hard origin/main git merge --no-ff release-v0.1 git push origin main
-
Create the release on GitHub:
- Go to the Releases page for the GitHub project.
- Click Draft a new release.
- Enter the tag name you just pushed.
- Click Auto-generate release notes.
- Edit the generated notes if you feel the need.
- See this page if you have an itch to customize how our notes are generated.
- If this is a pre-release version, check the pre-release box.
- Hit "Publish release".
-
If this was a fix release, merge changes to the main branch:
git checkout main git pull git merge --no-ff v0.1-fixes # Resolve conflicts. Accept main's versions of gradle.properties and podspecs. git push origin main -
Publish the documentation website, https://github.com/square/workflow
- Run the Publish Documentation Site action, providing a personal branch name in the last field (e.g.
yourname/kotlin-v0.1.0). - Pull the created branch and merge it into
gh-pagesgit fetch --allgit co gh-pagesgit merge --no-ff origin/yourname/kotlin-v0.1.0git push origin gh-pages
- Run the Publish Documentation Site action, providing a personal branch name in the last field (e.g.
-
Once Maven artifacts are synced, update the workflow version used by the tutorial in
samples/tutorial/build.gradle.
Since all of our high-level documentation is written in Markdown, we run a linter in CI to ensure we use consistent formatting. Lint errors will fail your PR builds, so to run locally, install markdownlint:
gem install mdlRun the linter using the lint_docs.sh:
./lint_docs.shRules can be configured by editing .markdownlint.rb.
To build and install the current version to your local Maven repository (~/.m2), run:
./gradlew clean publishToMavenLocalIn order to deploy artifacts to central.sonatype.org, you'll need to provide
your credentials via these two properties in your private Gradle properties
file(~/.gradle/gradle.properties).
mavenCentralUsername=<username>
mavenCentralPassword=<password>
In order to sign you'll need to specify your GPG key config in your private
Gradle properties file(~/.gradle/gradle.properties).
signing.keyId=<keyid>
signing.password=<password>
signing.secretKeyRingFile=<path/to/secring.gpg>
If this is your first time for either, the following one time steps need to be performed:
- Sign up for a Sonatype JIRA account.
- Generate a GPG key (if you don't already have one). Instructions.
- Distribute the GPG key to public servers. Instructions.
- Get access to deploy under 'com.squareup' from Sonatype.
Double-check that gradle.properties correctly contains the -SNAPSHOT suffix, then upload
snapshot artifacts to Sonatype just like you would for a production release:
./gradlew clean build && ./gradlew publishYou can verify the artifacts are available by visiting https://central.sonatype.org/content/repositories/snapshots/com/squareup/workflow1/.