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

Update release process #260

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 0 additions & 52 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
41 changes: 26 additions & 15 deletions docs/source/dev_guide/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/E3SM-Project/zstash/releases>`_.
2. Set `Tag version` to ``v<version>``, **including the "v"**. `@Target` should be ``main``.
Expand All @@ -58,24 +63,30 @@ Releasing on GitHub

* You can scroll through `zstash commits <https://github.com/E3SM-Project/zstash/commits/main>`_ for a list of changes.

5. If this version is a release candidate (``<version>`` 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 <github-release>`. 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 <https://github.com/E3SM-Project/zstash/actions>`_.
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 <https://github.com/conda-forge/zstash-feedstock/>`_ 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 <https://acme-climate.atlassian.net/wiki/spaces/WORKFLOW/pages/129732419/E3SM+Unified+Anaconda+Environment>`_.
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 <github-release>`. 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 <https://conda-forge.org/docs/maintainer/updating_pkgs.html#rerendering-feedstocks>`_).
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 <https://acme-climate.atlassian.net/wiki/spaces/WORKFLOW/pages/129732419/E3SM+Unified+Anaconda+Environment>`_.

Creating a New Version of the Documentation
-------------------------------------------
Expand Down