To configure tag driven releases from Travis CI.
- Generate a key pair for this repository with
./admin/genKeyPair.sh
. Edit.travis.yml
andadmin/build.sh
as prompted. - Publish the public key to https://pgp.mit.edu
- Store other secrets as encrypted environment variables with
./admin/encryptEnvVars.sh
. Edit.travis.yml
as prompted. - Edit
.travis.yml
to use./admin/build.sh
as the build script, and edit that script to use the tasks required for this project. Ensure thatRELEASE_COMBO
istrue
for build matrix combinations that should be released to sonatype (when building a tag).
It is important to add comments in .travis.yml
to identify the name
of each environment variable encoded in a secure
section.
After these steps, your .travis.yml
should contain config of the form:
language: scala
jdk:
- openjdk6
- oraclejdk8
scala:
- 2.11.12
- 2.12.6
env:
global:
# PGP_PASSPHRASE
- secure: "XXXXXX"
# SONA_USER
- secure: "XXXXXX"
# SONA_PASS
- secure: "XXXXXX"
script: admin/build.sh
notifications:
email:
- [email protected]
If Sonatype credentials change in the future, step 3 can be repeated without generating a new key.
- Follow the release process below to create a dummy release (e.g.,
v0.1.0-TEST1
). Confirm that the release was staged to Sonatype but do not release it to Maven central. Instead, drop the staging repository.
- Create a GitHub "Release" with a corresponding tag (e.g.,
v0.1.1
) via the GitHub web interface. - The release will be published using the Scala and JVM version combinations specified
in the travis build matrix where
[ "$RELEASE_COMBO" = "true" ]
.- If you need to release against a different Scala version, create a new commit that modifies
.travis.yml
and push a new tag, e.g.,v1.2.3#2.13.0-M5
. The suffix after#
is ignored.
- If you need to release against a different Scala version, create a new commit that modifies
- Travis CI will schedule a build for this release. Review the build logs.
- Log into https://oss.sonatype.org/ and identify the staging repository.
- Sanity check its contents.
- Release staging repository to Maven and send out release announcement.