Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Crystal 1.8.0 #233

Closed
30 of 32 tasks
straight-shoota opened this issue Mar 21, 2023 · 0 comments
Closed
30 of 32 tasks

Release Crystal 1.8.0 #233

straight-shoota opened this issue Mar 21, 2023 · 0 comments
Assignees
Labels

Comments

@straight-shoota
Copy link
Member

straight-shoota commented Mar 21, 2023

Release preparation

  1. Announce expected release date and time span for feature freeze
    • Feature freeze is about two weeks before release
    • Set date on milestone
  2. Prepare the changelog entry: crystal:scripts/github-changelog.cr
  3. Start preparing release notes (Release post 1.8.0 crystal-website#438)
  4. Start feature freeze period
    • Either no merging of features into master or split off release branch for backporting bugfixes.
  5. Publish release PR draft (Add changelog for 1.8.0 crystal#13274)
    • It should contain the expected date of the release.
    • It should be populated with updates to CHANGELOG.md and VERSION.
  6. Ensure documentation for language and compiler changes and other relevant changes is up to date.
    • Crystal Book
      • Update language specification
      • Update compiler manual
      • Add or update guides / tutorials?
  7. Ensure that test-ecosystem functions and succeeeds on master

Release process

Source release

  1. Finalize the release PR
    • Make sure all changes are mentioned in the changelog
    • Check release date
    • Un-draft the PR
  2. Split off release branch (release/x.y)
  3. Verify Maintenance CI workflow succeeds on the HEAD of the release branch
  4. Smoke test with test-ecosystem
  5. Merge the release PR
  6. Make the release and publish it on GitHub: scripts/make-crystal-release.sh (run from crystallang/crystal@master work tree). This performs these steps:
    1. Tag & annotate the commit with the changelog using <M.m.p> pattern as version
    • git tag -s -a -m $VERSION $VERSION
    • git push --tags
    1. Publish Github release (https://github.com/crystal-lang/crystal/releases/new)
      • Copy the changelog section as description
      • Binaries are added later
  7. Close milestone (https://github.com/crystal-lang/crystal/milestones)
  8. Wait for the release build in circle CI (https://app.circleci.com/pipelines/github/crystal-lang/crystal)

Binary releases

  1. Publish build artifacts from CircleCI and GitHub Actions to GitHub release
    • Upload build artifacts from CircleCI: scripts/publish-crystal-packages-on-github.sh
      • crystal-*-darwin-*.tar.gz
      • crystal-*-linux-*.tar.gz
      • crystal-*.pkg
      • crystal-*-docs.tar.gz
    • Upload build artifacts from GHA (Windows):
      • crystal.zip -> crystal-$VERSION-windows-x86_64-msvc-unsupported.zip
  2. Push changes to OBS for building linux packages
    1. Checkout https://github.com/crystal-lang/distribution-scripts and go to ./packages
    2. Configure build.opensuse.org credentials in environment variables:
      • export OBS_USER=
      • export OBS_PASSWORD=
    3. Update the crystal package: ./obs-release.sh devel:languages:crystal crystal $VERSION
      • Uses the docker image crystallang/osc to run the CLI client for OBS.
      • The script creates a branch in you home project, updates the version and pushes it back to OBS.
      • You can also run the commands from that file manually and check build locally with
        • osc build xUbuntu_20.04 x86_64
        • osc build Fedora_Rawhide x86_64
    4. Create the crystal${VERSION%.*} package: ./obs-new-minor.sh devel:languages:crystal crystal${VERSION%.*} $VERSION crystal${OLD_VERSION%.*}
    5. Now OBS builds the packages. It’s best to follow the build status in the browser:
      1. open https://build.opensuse.org/project/show/home:$OBS_USER:branches:devel:langauges:crystal/crystal
      2. Wait for all package build jobs to finish and succeed
    6. When everything is green, create a submit request against the original packages (Submit package link in the menu bar on the package in your branch)
    7. Verify package installation
      • OBS_PROJECT=devel:languages:crystal bats test
  3. Tag latest docker images
    • Versioned docker images have been pushed to dockerhub.
    • Now just assign the latest tags:
    • ./docker/apply-latest-tags.sh ${VERSION}
  4. Publish snap package
    1. You need to logged in via $ snapcraft login
    2. Recent tagged release is published directly to edge channel. The CI logs the snap revision number. Otherwise the .snap file is in the artifacts.
    3. Check the current status to find the revision of the tagged release otherwise:
    4. snapcraft status crystal
    5. snapcraft release crystal <revision-number> beta
    6. snapcraft release crystal <revision-number> stable
  5. Submit a PR to update the homebrew formula in https://github.com/Homebrew/homebrew-core/blob/master/Formula/crystal.rb (crystal 1.8.0 Homebrew/homebrew-core#128377)
    1. Update the previous and new version (with their respective hashes).
    2. Try locally brew install --build-from-source <source of formula>
    3. Create PR

Publish documentation for the release

  1. Publish API docs
    1. Have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env variables defined
    2. Run make -C docs publish_docs CRYSTAL_VERSION=${VERSION} to publish docs to api/${VERSION}
    3. Run make -C docs dist-redirect_latest CRYSTAL_VERSION=${VERSION} to apply redirect from api/latest to api/${VERSION}
  2. Publish Crystal book
    1. Create release/${VERSION%.*} branch (deployment happens automatically in GHA)
    2. Change default branch to release/${VERSION%.*}
    3. Verify that deployment was successfull

Release announcements

  1. Publish release notes on the website
  2. Post announcement in https://forum.crystal-lang.org/c/news/official
  3. Tweet about the release (and pin it)
  4. Post in Reddit
  5. Update https://github.com/crystal-lang/crystal-book/blob/master/crystal-version.txt
  6. Post the release in https://opencollective.com/crystal-lang

Post-release

  1. Update crystal master branch to use released version: crystal:scripts/release-update.sh (Update previous Crystal release - 1.8.0 crystal#13322)
    • Edit PREVIOUS_CRYSTAL_BASE_URL in .circleci/config.yml
    • Edit DOCKER_TEST_PREFIX in bin/ci
    • Edit prepare_build on_osx download package and folder
    • Edit .github/workflows/*.yml to point to docker image
    • Edit shell.nix latestCrystalBinary using nix-prefetch-url --unpack <url>
  2. Increment VERSION file to the next minor and -dev suffix
  3. Perform uncomment/todos left in the repo
  4. Update default base version in test-ecosystem: test-ecosystem:scripts/release-update.sh (Update previous crystal release - 1.8.1 test-ecosystem#42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant