From b0f500b7447357cdc6573628613e2b9fa8eebc1b Mon Sep 17 00:00:00 2001 From: Robert Kenny Date: Tue, 6 Jun 2023 16:47:43 +0100 Subject: [PATCH 1/3] add release instructions, bump version ready for release --- README.md | 30 ++++++++++++++++++++++++++++++ version.sbt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b4ba36..f15deb8 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,36 @@ In your build.sbt: libraryDependencies += "com.gu" %% "hmac-headers" % "" // find the latest version by checking this repo's tags ``` +## Releasing + +### Testing locally + +You can publish locally by running: + +```shell +# Test your signing setup works (you may need to follow the guide below first) +sbt +publishLocalSigned + +# Publish locally so that other projects can use your local ivy repository +sbt +publishLocal +``` + +### Get access to publish +You will need to have access to publish to Maven Central for `com.gu` assets. +You can [follow this guide](https://docs.google.com/document/d/1rNXjoZDqZMsQblOVXPAIIOMWuwUKe3KzTCttuqS7AcY/edit#heading=h.651termw35o0) +to get access. + +### Update the version +When you are ready to release, ensure that [`version.sbt`](./version.sbt) is updated and committed in the default branch +(`main`) with an appropriate version bump following [`semver`](https://semver.org/). + +### Tag and release +```shell +git tag -a v2.x -m "Releasing version 2.x" +git push origin v2.x +sbt release +```` + ## Verifying requests ``` diff --git a/version.sbt b/version.sbt index 7914ee9..5408a63 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "1.2.0" +ThisBuild / version := "2.0.0" From 7cdf834820e8f7f9939ecc4252d0899e9cedcc63 Mon Sep 17 00:00:00 2001 From: Robert Kenny Date: Wed, 7 Jun 2023 13:35:57 +0100 Subject: [PATCH 2/3] append snapshot to name Co-authored-by: Andrew Nowak <10963046+andrew-nowak@users.noreply.github.com> --- version.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.sbt b/version.sbt index 5408a63..106e757 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "2.0.0" +ThisBuild / version := "2.0.0-SNAPSHOT" From bd5b0e8cdd469d3368c5b912ffebf91c8f0e3bfb Mon Sep 17 00:00:00 2001 From: Robert Kenny Date: Wed, 7 Jun 2023 13:37:48 +0100 Subject: [PATCH 3/3] Remove unnecessary reference to creating tags in readme --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f15deb8..466970a 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,10 @@ When you are ready to release, ensure that [`version.sbt`](./version.sbt) is upd (`main`) with an appropriate version bump following [`semver`](https://semver.org/). ### Tag and release + +This will create & push the appropriate version tag for you: + ```shell -git tag -a v2.x -m "Releasing version 2.x" -git push origin v2.x sbt release ````