When releasing a new version of Agda standard library, the following
procedure should be followed:

#### Pre-release changes

* Update `README.agda` by replacing 'development version' by 'version X.Y' in the title.

* Update `README.md`

* Update `agda-stdlib-utils.cabal` version to `X.Y`.

* Update the version in standard-library.agda-lib to `X.Y`

* Update `notes/installation-guide.txt`

* Update `CHANGELOG.md`.

* Update the copyright year range in the LICENSE file, if necessary.

#### Pre-release tests

* Ensure that the library type-checks using Agda A.B.C:

    make test

* Update submodule commit in the Agda repository:

    cd agda
    make fast-forward-std-lib

* Build the latest version of Agda

    make quicker-install-bin

* Run the tests involving the library:

    make test-using-std-lib

* Commit the changes and push

#### Release

* Tag version X.Y (do not forget to record the changes above first):

    VERSION=X.Y
    git tag -a v$VERSION -m "Agda standard library version $VERSION"

* Push all the changes and the new tag (requires Git >= 1.8.3):

    git push --follow-tags

* Make a new release on Github at https://github.com/agda/agda-stdlib/releases

* Submit a pull request to update the version of standard library on Homebrew
  (https://github.com/Homebrew/homebrew-core/blob/master/Formula/agda.rb)

* Update the Agda wiki:

  ** The standard library page.

  ** News section on the main page.

* Announce the release of the new version on the Agda mailing lists
  (users and developers).

* Add v$VERSION to the list of protected directories in the .travis.yml
  file of BOTH master and experimental. They should look something like:

  >  git checkout HEAD -- v0.16/ v0.17/ v1.0/ v1.1/ (...)

  Commit & push these changes. This will prevent the next step from being
  overwritten by travis.

* Generate and upload documentation for the released version:

    cp travis/* .
    runhaskell GenerateEverything.hs
    ./index.sh
    agda -i. -isrc --html index.agda
    mv html v$VERSION
    git checkout gh-pages
    git add v$VERSION/*.html v$VERSION/*.css
    git commit -m "[ release ] doc for version $VERSION"
    git push

  After that you can cleanup the generated files and copies of things taken from travis/
  from your agda-stdlib directory.

#### Post-release

* Move the CHANGELOG.md into the old CHANGELOG folders

* Create new CHANGELOG.md file

* Revert changes in README.md to reference development version
