From c08bb8e66c00c84cfba4932b56ec9846e1e2117b Mon Sep 17 00:00:00 2001 From: Ryan Forsyth Date: Wed, 22 Mar 2023 16:35:03 -0500 Subject: [PATCH] Update release process --- .github/workflows/release_workflow.yml | 52 -------------------------- docs/source/dev_guide/release.rst | 41 ++++++++++++-------- 2 files changed, 26 insertions(+), 67 deletions(-) diff --git a/.github/workflows/release_workflow.yml b/.github/workflows/release_workflow.yml index caa97694..ff9a9bf0 100644 --- a/.github/workflows/release_workflow.yml +++ b/.github/workflows/release_workflow.yml @@ -34,7 +34,6 @@ jobs: ${{ runner.os }}- # Using pip for Sphinx dependencies because it takes too long to reproduce a conda environment (~10 secs vs. 3-4 mins) - # Low risk trade-off with mismatching dependencies in `conda/zstash_dev.yml` - name: Install Dependencies run: | pip install sphinx==5.2.3 sphinx_rtd_theme==1.0.0 sphinx-multiversion==0.2.4 docutils==0.16 "jinja2<3.1" @@ -78,54 +77,3 @@ jobs: directory: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} force: true - - publish-to-anaconda: - runs-on: ubuntu-latest - timeout-minutes: 10 - defaults: - run: - shell: bash -l {0} - steps: - - uses: actions/checkout@v3 - - - name: Cache Conda - uses: actions/cache@v3 - env: - # Increase this value to reset cache if conda/zstash_dev.yml has not changed in the workflow - CACHE_NUMBER: 0 - with: - path: ~/conda_pkgs_dir - key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-publish - - - name: Set up Conda Environment - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: "zstash_publishing" - channel-priority: strict - python-version: 3.9 - auto-update-conda: true - # IMPORTANT: This needs to be set for caching to work properly! - use-only-tar-bz2: true - - - name: Additional Conda Config - run: | - conda install anaconda-client conda-build conda-verify - conda config --set anaconda_upload no - - - name: Build Conda Package - run: conda build -c conda-forge --output-folder . . - - - name: Publish to Anaconda (e3sm channel) - env: - ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} - run: | - label="main" - - for file in noarch/*.tar.bz2; do - if [[ "$file" == noarch/*"rc"*.tar.bz2 ]]; then - label="e3sm_dev" - fi - done - - echo Uploading to conda-forge with \'$label\' label - anaconda upload --label $label noarch/*.tar.bz2 --force diff --git a/docs/source/dev_guide/release.rst b/docs/source/dev_guide/release.rst index fd8a9782..015cca49 100644 --- a/docs/source/dev_guide/release.rst +++ b/docs/source/dev_guide/release.rst @@ -48,8 +48,13 @@ Bumping the Version .. _github-release: -Releasing on GitHub -------------------- +Releasing on GitHub: release candidates +--------------------------------------- + +1. Create a tag for the release candidate at https://github.com/E3SM-Project/zstash/tags. + +Releasing on GitHub: production releases +---------------------------------------- 1. Draft a new release `here `_. 2. Set `Tag version` to ``v``, **including the "v"**. `@Target` should be ``main``. @@ -58,24 +63,30 @@ Releasing on GitHub * You can scroll through `zstash commits `_ for a list of changes. -5. If this version is a release candidate (```` appended with ``rc``), checkmark `This is a pre-release`. -6. Click `Publish release`. -7. CI/CD release workflow is automatically triggered. +5. Click `Publish release`. +6. CI/CD release workflow is automatically triggered. -Releasing on Anaconda ------------------- -1. Be sure to have already completed :ref:`Releasing On GitHub `. This triggers the CI/CD workflow that handles Anaconda releases. -2. Wait until the CI/CD build is successful. You can view all workflows at `All Workflows `_. -3. Check the https://anaconda.org/e3sm/zstash page to view the newly updated package. +Releasing on conda-forge: release candidates +-------------------------------------------- + +1. Make a PR to `conda-forge `_ from your fork of the feedstock. Note that the conda-forge bot does not work for release candidates. - * Release candidates are assigned the ``e3sm_dev`` label - * Production releases are assigned the ``main`` label + * Start from the current dev branch and update the version number and the sha256 sum manually. + * Set the build number back to 0 if needed. + * Make the dev branch the target of the PR. Then, the package build on conda-forge will end up with the ``e3sm_dev`` label. -4. Notify the maintainers of the unified E3SM environment about the new release on the `E3SM Confluence site `_. +2. Check the https://anaconda.org/conda-forge/zstash page to view the newly updated package. Release candidates are assigned the ``e3sm_dev`` label. - * Be sure to only update the ``zstash`` version number in the correct version(s) of the E3SM Unified environment. - * This is almost certainly one of the versions listed under “Next versions”. If you are uncertain of which to update, leave a comment on the page asking. +Releasing on conda-forge: production releases +------------------ + +1. Be sure to have already completed :ref:`Releasing On GitHub `. This triggers the CI/CD workflow that handles Anaconda releases. +2. Wait for a bot PR to come up automatically on conda-forge after the GitHub release. This can happen anywhere from 1 hour to 1 day later. +3. Re-render the PR (see `docs `_). +4. Merge the PR on conda-forge. +5. Check the https://anaconda.org/conda-forge/zstash page to view the newly updated package. Production releases are assigned the ``main`` label. +6. Notify the maintainers of the unified E3SM environment about the new release on the `E3SM Confluence site `_. Creating a New Version of the Documentation -------------------------------------------