-
Merge an update of the change log with the changes since the last release.
-
Make sure you're on the
main
branch (or fix branch, e.g.v0.1-fixes
). -
Confirm that the kotlin build is green before committing any changes
./gradlew build connectedCheck
-
In
gradle.properties
, remove the-SNAPSHOT
suffix from theVERSION_NAME
property. 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
-
Upload the kotlin artifacts:
./gradlew clean build && ./gradlew uploadArchives --no-parallel
Disabling parallelism and daemon sharing is required by the vanniktech maven publish plugin. Without those, the artifacts will be split across multiple (invalid) staging repositories. (Note that
uploadArchives
is deprecated in favor ofpublish
, butpublish
makes bad artifacts.) -
Close and release the staging repository at https://oss.sonatype.org/#stagingRepositories.
-
Bump the version
- Kotlin: Update the
VERSION_NAME
property ingradle.properties
to the new snapshot version, e.g.VERSION_NAME=0.2.0-SNAPSHOT
.
- Kotlin: Update the
-
Commit the new snapshot version:
git commit -am "Finish releasing v0.1.0."
-
Push your commits and tag:
git push origin main # or git push origin fix-branch git push origin v0.1.0
-
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.
- Title the release with the same name as the tag.
- Copy & paste the changelog entry for this release into the description.
- 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-pages
git fetch --all
git co gh-pages
git merge --no-ff origin/yourname/kotlin-v0.1.0
git 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 mdl
Run the linter using the lint_docs.sh
:
./lint_docs.sh
Rules can be configured by editing .markdownlint.rb
.
To build and install the current version to your local Maven repository (~/.m2
), run:
./gradlew clean publishToMavenLocal
In order to deploy artifacts to a Maven repository, you'll need to set 4 properties in your private
Gradle properties file (~/.gradle/gradle.properties
):
RELEASE_REPOSITORY_URL=<url of release repository>
SNAPSHOT_REPOSITORY_URL=<url of snapshot repository
mavenCentralUsername=<username>
mavenCentralPassword=<password>
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 uploadArchives --no-parallel
You can verify the artifacts are available by visiting https://oss.sonatype.org/content/repositories/snapshots/com/squareup/workflow/.