1
1
## Tag Driven Releasing
2
2
3
- Copied from https://github.com/scala/scala-java8-compat/commit/4a6cfc97cd95227b86650410e1b632e5ff79335b .
4
-
5
3
### Background Reading
6
4
7
5
- http://docs.travis-ci.com/user/environment-variables/
@@ -14,47 +12,61 @@ To configure tag driven releases from Travis CI.
14
12
15
13
1 . Generate a key pair for this repository with ` ./admin/genKeyPair.sh ` .
16
14
Edit ` .travis.yml ` and ` admin/build.sh ` as prompted.
17
- 2 . Publish the public key to https://pgp.mit.edu
18
- 3 . Store other secrets as encrypted environment variables with ` admin/encryptEnvVars.sh ` .
15
+ 1 . Publish the public key to https://pgp.mit.edu
16
+ 1 . Store other secrets as encrypted environment variables with ` admin/encryptEnvVars.sh ` .
19
17
Edit ` .travis.yml ` as prompted.
20
- 4 . Edit ` .travis.yml ` to use ` ./admin/build.sh ` as the build script,
18
+ 1 . Edit ` .travis.yml ` to use ` ./admin/build.sh ` as the build script,
21
19
and edit that script to use the tasks required for this project.
22
- 5 . Edit ` build.sbt ` to select which JDK will be used for publishing.
20
+ 1 . Edit ` build.sbt ` 's ` scalaVersionsByJvm in ThisBuild ` to select Scala and JVM version
21
+ combinations that will be used for publishing.
23
22
24
- It is important to add comments in .travis.yml to identify the name
23
+ It is important to add comments in ` .travis.yml ` to identify the name
25
24
of each environment variable encoded in a ` :secure ` section.
26
25
27
- After all of these steps, your .travis.yml should contain config of the
28
- form:
26
+ After these steps, your ` .travis.yml ` should contain config of the form:
27
+
28
+ ```
29
+ language: scala
30
+
31
+ env:
32
+ global:
33
+ # PGP_PASSPHRASE
34
+ - secure: "XXXXXX"
35
+ # SONA_USER
36
+ - secure: "XXXXXX"
37
+ # SONA_PASS
38
+ - secure: "XXXXXX"
39
+
40
+ script: admin/build.sh
29
41
30
- language: scala
31
- env:
32
- global:
33
- # PGP_PASSPHRASE
34
- - secure: "XXXXXX"
35
- # SONA_USER
36
- - secure: "XXXXXX"
37
- # SONA_PASS
38
- - secure: "XXXXXX"
39
- script: admin/build.sh
42
+ jdk:
43
+ - openjdk6
44
+ - oraclejdk8
45
+
46
+ notifications:
47
+ email:
48
+
49
+ ```
40
50
41
51
If Sonatype credentials change in the future, step 3 can be repeated
42
52
without generating a new key.
43
53
44
- Be sure to use SBT 0.13.7 or higher to avoid [ #1430 ] ( https://github.com/sbt/sbt/issues/1430 ) !
45
-
46
54
### Testing
47
55
48
- 1 . Follow the release process below to create a dummy release (e.g. 0 .1.0-TEST1).
56
+ 1 . Follow the release process below to create a dummy release (e.g., ` v0 .1.0-TEST1` ).
49
57
Confirm that the release was staged to Sonatype but do not release it to Maven
50
58
central. Instead, drop the staging repository.
51
59
52
60
### Performing a release
53
61
54
- 1 . Create a GitHub "Release" ( with a corresponding tag) via the GitHub
62
+ 1 . Create a GitHub "Release" with a corresponding tag (e.g., ` v0.1.1 ` ) via the GitHub
55
63
web interface.
56
- 2 . Travis CI will schedule a build for this release. Review the build logs.
57
- 3 . Log into https://oss.sonatype.org/ and identify the staging repository.
58
- 4 . Sanity check its contents
59
- 5 . Release staging repository to Maven and send out release announcement.
60
-
64
+ 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.
69
+ 1 . Travis CI will schedule a build for this release. Review the build logs.
70
+ 1 . Log into https://oss.sonatype.org/ and identify the staging repository.
71
+ 1 . Sanity check its contents.
72
+ 1 . Release staging repository to Maven and send out release announcement.
0 commit comments