11## Tag Driven Releasing
22
3- ### Background Reading
4-
5- - http://docs.travis-ci.com/user/environment-variables/
6- - http://docs.travis-ci.com/user/encryption-keys/
7- - http://docs.travis-ci.com/user/encrypting-files/
8-
93### Initial setup for the repository
104
115To configure tag driven releases from Travis CI.
126
137 1 . Generate a key pair for this repository with ` ./admin/genKeyPair.sh ` .
148 Edit ` .travis.yml ` and ` admin/build.sh ` as prompted.
159 1 . Publish the public key to https://pgp.mit.edu
16- 1 . Store other secrets as encrypted environment variables with ` admin/encryptEnvVars.sh ` .
10+ 1 . Store other secrets as encrypted environment variables with ` ./ admin/encryptEnvVars.sh` .
1711 Edit ` .travis.yml ` as prompted.
1812 1 . Edit ` .travis.yml ` to use ` ./admin/build.sh ` as the build script,
1913 and edit that script to use the tasks required for this project.
20- 1 . Edit ` build.sbt ` 's ` scalaVersionsByJvm in ThisBuild ` to select Scala and JVM version
21- combinations that will be used for publishing .
14+ Ensure that ` RELEASE_COMBO ` is ` true ` for build matrix combinations
15+ that should be released to sonatype (when building a tag) .
2216
2317It is important to add comments in ` .travis.yml ` to identify the name
24- of each environment variable encoded in a ` : secure` section.
18+ of each environment variable encoded in a ` secure ` section.
2519
2620After these steps, your ` .travis.yml ` should contain config of the form:
2721
3731 # SONA_PASS
3832 - secure: "XXXXXX"
3933
40- script: admin/build.sh
34+ script:
35+ - admin/build.sh
4136
4237jdk:
4338 - oraclejdk8
@@ -62,10 +57,9 @@ without generating a new key.
6257 1 . Create a GitHub "Release" with a corresponding tag (e.g., ` v0.1.1 ` ) via the GitHub
6358 web interface.
6459 1 . The release will be published using the Scala and JVM version combinations specified
65- in ` scalaVersionsByJvm ` in ` build.sbt ` .
66- - If you need to release against a different Scala version, include the Scala version
67- and the JVM version to use in the tag name, separated by ` # ` s (e.g., ` v0.1.1#2.13.0-M1#8 ` ).
68- Note that the JVM version needs to be listed in ` .travis.yml ` for the build to run.
60+ in the travis build matrix where ` [ "$RELEASE_COMBO" = "true" ] ` .
61+ - If you need to release against a different Scala version, create a new commit that modifies
62+ ` .travis.yml ` and push a new tag, e.g., ` v1.2.3#2.13.0-M5 ` . The suffix after ` # ` is ignored.
6963 1 . Travis CI will schedule a build for this release. Review the build logs.
7064 1 . Log into https://oss.sonatype.org/ and identify the staging repository.
7165 1 . Sanity check its contents.
0 commit comments