1
1
## Tag Driven Releasing
2
2
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
-
9
3
### Initial setup for the repository
10
4
11
5
To configure tag driven releases from Travis CI.
12
6
13
7
1 . Generate a key pair for this repository with ` ./admin/genKeyPair.sh ` .
14
8
Edit ` .travis.yml ` and ` admin/build.sh ` as prompted.
15
9
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` .
17
11
Edit ` .travis.yml ` as prompted.
18
12
1 . Edit ` .travis.yml ` to use ` ./admin/build.sh ` as the build script,
19
13
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) .
22
16
23
17
It 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.
25
19
26
20
After these steps, your ` .travis.yml ` should contain config of the form:
27
21
37
31
# SONA_PASS
38
32
- secure: "XXXXXX"
39
33
40
- script: admin/build.sh
34
+ script:
35
+ - admin/build.sh
41
36
42
37
jdk:
43
38
- oraclejdk8
@@ -62,10 +57,9 @@ without generating a new key.
62
57
1 . Create a GitHub "Release" with a corresponding tag (e.g., ` v0.1.1 ` ) via the GitHub
63
58
web interface.
64
59
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.
69
63
1 . Travis CI will schedule a build for this release. Review the build logs.
70
64
1 . Log into https://oss.sonatype.org/ and identify the staging repository.
71
65
1 . Sanity check its contents.
0 commit comments