Skip to content

Release Process

Edward Slavich edited this page Sep 2, 2021 · 28 revisions

Prepare master for release

These steps should be undertaken on the master branch:

  1. Update the project changelog (CHANGES.rst in the repo root) and change "unreleased" next to your intended release to the current date in YYYY-MM-DD format.

  2. Open a PR and merge the above changes to master.

Create/update the release branch

If you're making a major or minor version release, then the release branch will not yet exist. If you're releasing a patch version, then a release branch will already exist. Select one of the next two sections accordingly. The following steps assume that the spacetelescope/stdatamodels remote is named upstream.

Major or minor version release

  1. Fetch and checkout the upstream master:
$ git fetch upstream
$ git checkout upstream/master
  1. Inspect the log to ensure that no commits have snuck in since your changelog updates:
$ git log
  1. Create a new release branch. The name of the release branch should share the major and minor version of your release version, but the patch version should be x. For example, when releasing 1.8.0, name the branch 1.8.x.
$ git checkout -b a.b.x
  1. Push the branch to the upstream remote:
$ git push -u upstream HEAD
  1. GitHub actions should notice the new branch and run the tests. Wait until the job completes before proceeding.

Patch release

In the case of a patch release, the release branch will already exist.

  1. Checkout and freshen release branch (this assumes that your local branch is already tracking upstream/a.b.x):
$ git checkout a.b.x
$ git pull
  1. Cherry-pick relevant commits from master that should be included in the patch release (including the new changelog commit):
$ git cherry-pick ...
  1. Push updates to the upstream remote:
$ git push upstream HEAD

Review the release branch's latest CI run

The creation or update of the release branch should have triggered a CI job on GitHub actions. Find the a.b.x branch listed here:

https://github.com/spacetelescope/stdatamodels/actions/workflows/ci.yml

and click through to the latest build.

Run tests on our consuming packages

Once the release branch is situated, it's a good idea to confirm that our release candidate doesn't break the following test suites:

  • jwst regression tests

Create the release tag

At this point, you should have the release branch checked out and ready to tag.

  1. Create an annotated tag with a name that matches your intended release:
$ git tag -a a.b.c -m "Tagging a.b.c release on a.b.x release branch"
  1. Push the new tag to the upstream remote:
$ git push upstream a.b.c

Maintain the stable branch (if necessary)

The stable branch points to the latest official release of stdatamodels. If the current release has become the latest, then the next step is to rewrite the stable branch to point our new tag.

$ git checkout stable
$ git reset --hard a.b.c
$ git push upstream stable --force

Publish the package

Publish to GitHub releases

  1. Visit the stdatamodels repository's releases page. You should see the new tag for your release version listed at the top, without a link or description.

  2. Click Draft a new release.

  3. Select the existing tag, and title the release the same as the tag (i.e., a.b.c).

  4. Press the Publish release button.

Confirm pypi publish

The repo is configured with an action that should publish the package to pypi when the release is created. After a few minutes, confirm that you're able to install the new version using pip:

$ pip install stdatamodels==a.b.c
Clone this wiki locally