11## Tag Driven Releasing
22
3- Copied from https://github.com/scala/scala-java8-compat/commit/4a6cfc97cd95227b86650410e1b632e5ff79335b .
4-
53### Background Reading
64
75 - http://docs.travis-ci.com/user/environment-variables/
@@ -14,47 +12,61 @@ To configure tag driven releases from Travis CI.
1412
1513 1 . Generate a key pair for this repository with ` ./admin/genKeyPair.sh ` .
1614 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 ` .
1917 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,
2119 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.
2322
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
2524of each environment variable encoded in a ` :secure ` section.
2625
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
2941
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+ ```
4050
4151If Sonatype credentials change in the future, step 3 can be repeated
4252without generating a new key.
4353
44- Be sure to use SBT 0.13.7 or higher to avoid [ #1430 ] ( https://github.com/sbt/sbt/issues/1430 ) !
45-
4654### Testing
4755
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` ).
4957 Confirm that the release was staged to Sonatype but do not release it to Maven
5058 central. Instead, drop the staging repository.
5159
5260### Performing a release
5361
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
5563 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