Description
For every Scala release, make a copy of this file named after the release, and expand the variables.
Ideally this should become a script you can run on your local machine. The only missing piece is programmatic triggering of Travis-CI jobs with custom config.
Variables to be expanded in this template (or export them in a local terminal, so that you can copy/paste the commands below without replacing anything):
SCALA_VER_BASE="2.13.8"
SCALA_VER_SUFFIX=""
SCALA_SHA=4b2151cbe4c857d49556b70c3fa0f5e236fd7754
DIST_SHA=b1df74d6534b5d84ace76645fbd08e073a9128d3
SCALA_VER="$SCALA_VER_BASE$SCALA_VER_SUFFIX"
Key links:
- scala/scala milestone: https://github.com/scala/scala/milestones/2.13.8
- scala/bug milestone: https://github.com/scala/bug/milestones/2.13.8
- scala/scala-dev milestone: https://github.com/scala/scala-dev/milestones/2.13.8
- Discourse topic: https://contributors.scala-lang.org/t/scala-2-13-8-release-planning/5487
- release notes draft: Scala 2.13.8 draft release notes #803
N weeks before the release
- Wind down PR queue. There has to be enough time after the last (non-trivial) PR is merged and the next phase. The core of the eco-system needs time to prepare for the final!
- Triage scala/bug and scala/scala-dev tickets
- Create next scala/scala milestone, move the magical "Merge to 2.13.x" description to it (so Scabot uses it as default for new PRs), move pending PRs
- Create next scala/bug milestone, move pending issues
- Create next scala/scala-dev milestone, move pending issues
- Check PRs assigned to the milestone, also check WIP
- Announce expected release date and current nightly "release candidate" (nightly sha-mangled version) at https://scala-ci.typesafe.com/artifactory/scala-integration/ on https://contributors.scala-lang.org/c/announcements
- Also notify Scala Center advisory board members of the upcoming release, so they can help test if they want (Seth can handle this, if asked)
Release announcement / notes
- Notify community on https://contributors.scala-lang.org/c/announcements
- Review merged PRs, make sure release-notes label is applied appropriately
- PRs with release-notes label must have excellent title & description (title will be pasted literally in release note bullet list)
- Draft release notes (PR and self-merge, so others can comment there rather than on the commits)
- Starting point:
gh api --paginate -X GET search/issues -f q='repo:scala/scala is:pull-request is:merged milestone:2.12.14 label:release-notes' -q '.items[] | " * \(.title) ([#\(.number)](\(.html_url)) by [@\(.user.login)](\(.user.html_url)))"'
- Starting point:
- On contributors thread, link to release note file and request feedback
N days before release
- Announce no more PRs will be merged unless last-minute regressions are found. Re-iterate current nightly sha version for testing.
- Community build
- Windows build on GitHub Actions: https://github.com/scala/scala/actions/runs/1592204281
- JDK 17 build on Travis-CI (cron job): https://app.travis-ci.com/github/scala/scala/builds/243839581
- Check any merged PRs accidentally assigned to the next milestone in this branch, and re-assign them to this milestone
- Merge in any older release branch
- Check module versioning (is everything in versions.properties up to date?)
- On major release, bump PickleFormat version
- Close the scala/scala and scala/bug milestones
Point of no return
Once sufficient time for community testing has passed, it's time to cut the release!
What is "sufficient" time? A week is a bare minimum. Two weeks is a better "normal" amount. We should also respect requests from Scala Center advisory board members, if they explicitly ask for additional testing time. (In the past, we sometimes only waited a day or two, but this was overly optimistic in presuming that people had been testing nightlies all along.)
Be mindful of others' schedules; even minor releases make work downstream (for Scala.js and Scala Native, for the Scala 3 team, for compiler plugin authors, and so on). And a botched release might make unexpected work for ourselves as well as for others. So it's better not to release on a Friday or even a Thursday, or too close to a major holiday. And it's best to release while everyone in both America and Europe is awake. (First thing in the morning in America is a good choice.)
- Make sure there are no stray staging repos on Sonatype
- Trigger a custom build on travis
- Select the correct branch
- Custom config:
before_script: export SCALA_VER_BASE=$SCALA_VER_BASE SCALA_VER_SUFFIX=$SCALA_VER_SUFFIX
- Check the build status on https://github.com/scala/scala/commits/2.13.x
- Check that the scala/scala job also triggered a following scala/scala-dist job: https://app.travis-ci.com/github/scala/scala-dist/builds/244555359
- Create the scala/scala tag locally:
git tag -s -m "Scala $SCALA_VER" v$SCALA_VER $SCALA_SHA
- Create scala-dist tag locally:
git tag -s -m "Scala $SCALA_VER" v$SCALA_VER $DIST_SHA
- Note the repos to be promoted after tag is cut (see travis log)
- Sanity check jar/pom
- https://oss.sonatype.org/content/repositories/staging/org/scala-lang/scala-compiler/2.13.8/
- in particular, if the release was staged multiple times, double check that https://oss.sonatype.org/content/repositories/staging/ has the files from the most recent build
- Check that JARs haven't mysteriously bloated — compare sizes to previous release. We have no other backstop for this.
- Remember, tags are forever, so are maven artifacts (even staged ones, as they could end up in local caches) and S3 uploads (S3 buckets can be changed, but it can takes days to become consistent)
- Push scala/scala tag:
git push https://github.com/scala/scala.git v$SCALA_VER
- Push scala/scala-dist tag:
git push https://github.com/scala/scala-dist.git v$SCALA_VER
- Trigger two scala-dist jobs on travis (https://app.travis-ci.com/github/scala/scala-dist) with custom config. must use full-length SHAs!
before_script: export version=$SCALA_VER scala_sha=$SCALA_SHA mode=archives
: https://app.travis-ci.com/github/scala/scala-dist/builds/244556354before_script: export version=$SCALA_VER scala_sha=$SCALA_SHA mode=update-api
: https://app.travis-ci.com/github/scala/scala-dist/builds/244556405
- Promote staging repos:
st_stagingRepoPromote [scala-repo]
,st_stagingRepoPromote [modules-repo]
(or use oss.sonatype.org web UI)
Check availability
- Check release on sonatype: https://oss.sonatype.org/content/repositories/releases/org/scala-lang/scala-compiler/$SCALA_VER/
- Check the release on maven central: https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/$SCALA_VER/