Skip to content

Commit 31124f0

Browse files
author
JeanMarc van Leerdam
committed
Document the (automated) release process based on vX.Y.Z tags
1 parent 2c765d2 commit 31124f0

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,30 +101,41 @@ Note: to successfully run the `deploy` scripted test, you need to have the Azure
101101
to a subscription that has a resource group and storage account as specified in the `sbt-test/sbt-azure-functions/deploy/build.sbt` file.
102102

103103
## Releasing (for plugin maintainers)
104-
To release a new version, make sure you have:
104+
To release a new version, all you have to do is push a tag that starts with `v` (`v0.5.1` for example).
105+
106+
The Github Action `Release` will pick it up and perform the `sbt ci-release` command, which will publish the plugin to Sonatype.
107+
108+
Then go to the Github Repo and create a new release, using the tag you just pushed.
109+
110+
### Local releases
111+
In case you want to run the `sbt ci-release` command locally, you need to mimic the environment that the Github Action uses.
112+
Make sure you have:
105113
* proper access to the `nl.codestar` namespace on Sonatype.
106114
* GnuPG (`gpg`) installed and a signing key configured.
107115
* We use `sbt-pgp` plugin to sign, which relies on the `gpg` command line tool
108116
* create a `.env` file in the project root with the following variables:
109117
```
110-
PGP_SECRET=<id of the signing key>
118+
PGP_ID=<id of the signing key>
119+
PGP_SECRET="---BEGIN PGP PRIVATE KEY BLOCK ---
120+
...
121+
---END PGP PRIVATE KEY BLOCK---"
122+
PGP_SECRET_B64=<base64 encoded version of PGP_SECRET>
111123
PGP_PASSPHRASE=<your PGP passphrase>
112124
SONATYPE_USERNAME=<user id or token id>
113125
SONATYPE_PASSWORD=<password or token>
114-
115126
```
116127

117-
Note: The `.env` file needs to be kept out of the git repository (it is `.gitignore`d).
128+
Note: The `.env` file needs to be kept out of the git repository (it is `.gitignore`d)!
118129

119130
See [Using Sonatype](https://www.scala-sbt.org/1.x/docs/Using-Sonatype.html) in the SBT documentation.
120131

121-
### SNAPSHOT versions
132+
#### SNAPSHOT versions
122133
Steps to release SNAPSHOT version:
123134
1. Make sure HEAD is not directly pointing to a tag
124135
2. `sbt publishSigned`
125136
3. make note of the SNAPSHOT version that is used (Sonatype does not allow searching/browsing for SNAPSHOT versions)
126137

127-
### Production versions
138+
#### Production versions
128139
Steps to release production version:
129140
1. Tag the current commit with the new version number, e.g. `git tag v0.5.0`
130141
2. `sbt publishSigned`

0 commit comments

Comments
 (0)