Skip to content

Commit

Permalink
BUG - Fix release workflows (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard authored Sep 17, 2024
1 parent 6da65e6 commit 2352580
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 106 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ contact_links:
- name: conda-store documentation
url: https://conda.store/en/latest/
about: Check out the conda-store documentation
- name: conda-store issue tracker
about: Did you find a bug or want to suggest something? Please open an issue on our tracker.
url: https://https://github.com/conda-incubator/conda-store/issues/new/choose
- name: Contribution guidelines
about: Do you want to contribute to conda-store? Visit our community guidelines
url: https://conda.store/community/contribute/
20 changes: 15 additions & 5 deletions .github/ISSUE_TEMPLATE/new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Release captain responsible - <@gh_username>

### 2. Prepare the codebase for a new release

- [ ] Create a new git branch for the release `git checkout -b release-2023.9.1`
- [ ] Create a new git branch for the release `git checkout -b release-2024.9.1`
- [ ] Prepare the branch just in case `git clean -fxdq`
- [ ] Bump `conda-store` version in [`conda-store/conda-store/__init__.py`](https://github.com/conda-incubator/conda-store/blob/main/conda-store/conda_store/__init__.py)
- [ ] Bump `conda-store-server` version in [`conda-store-server/conda-store-server/__init__.py`](https://github.com/conda-incubator/conda-store/blob/main/conda-store/conda_store/__init__.py)
Expand All @@ -40,15 +40,24 @@ Release captain responsible - <@gh_username>
hatch clean
```

- [ ] Make a release commit: ``git commit -m 'REL - 2023.9.1'``
- [ ] After building `conda-store-server` and before `hatch clean` run the server in standalone mode:

```bash
cd conda-store-server
conda-store-server --standalone
```

To do a manual inspection of the build and `ui` vendoring process.

- [ ] Make a release commit: ``git commit -m 'REL - 2024.9.1'``
- [ ] Push the release (REL) commit ``git push upstream main``
- [ ] If a **release candidate** is needed, tick this box when we're ready for a full release.
### 3. Make the release
- [ ] [Start a new GitHub release](https://github.com/conda-incubator/conda-store/releases/new)
- Call the release the current version, e.g. `2023.9.1`
- In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `2023.9.1`) and click "Create new tag"
- Call the release the current version, e.g. `2024.9.1`
- In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `2024.9.1`) and click "Create new tag"
- In the **`Target:`** dropdown, pin it to the release commit you've recently pushed.
- Add release notes in the field below[^github-activity]; you can copy/paste the Changelog from the [CHANGELOG.md](./CHANGELOG.md) file.
- [ ] Confirm that the release completed
Expand All @@ -58,6 +67,7 @@ Release captain responsible - <@gh_username>
- [The Docker images have been published](https://github.com/conda-incubator/conda-store/blob/main/.github/workflows/build_docker_image.yaml)
- [ ] Update the [conda-forge feedstock version](https://github.com/conda-forge/conda-store-feedstock) through a PR or review and merge the regro-bot PR.
- [ ] If needed - update `meta.yaml` or `recipe.yaml` and re-render the feedstock.
- [ ] Open a follow-up PR to bump `conda-store` and `conda-store-server` versions to the next dev-release number (for example `2024.10.1`).
- [ ] Celebrate, you're done! 🎉
[^github-activity]: If you wish, use [`github-activity` to generate a Changelog](https://github.com/choldgraf/github-activity), e.g. `github-activity conda-incubator/conda-store --since 2023.9.1 --until 2023.10.1`.
[^github-activity]: If you wish, use [`github-activity` to generate a Changelog](https://github.com/choldgraf/github-activity), e.g. `github-activity conda-incubator/conda-store --since 2024.9.1 --until 2023.10.1`.
20 changes: 9 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,14 @@ jobs:

- run: echo "Running on ${{ matrix.directory }}"

- name: "Check package build - ${{ matrix.directory }} 📦"
- name: "Build and check package - ${{ matrix.directory }} 📦"
uses: hynek/build-and-inspect-python-package@v2
id: baipp
with:
path: ${{ matrix.directory }}
upload-name-suffix: "-${{ matrix.directory }}"

# Adding a separate upload for publishing
- name: "Upload build artefacts 📤"
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.directory }}-package
path: |
/tmp/baipp/dist/*.whl
/tmp/baipp/dist/*.tar.gz
- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }} and in artifact ${{ steps.baipp.outputs.artifact-name }}

# Upload to Test PyPI on every commit on main
release-test-pypi:
Expand All @@ -72,9 +66,11 @@ jobs:
- name: "Download build artefacts 📥"
uses: actions/[email protected]
with:
name: ${{ matrix.directory }}-package
name: Packages-${{ matrix.directory }}
path: dist

- run: tar xf dist/*.tar.gz --strip-components=1

- name: "Upload package to Test PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down Expand Up @@ -104,9 +100,11 @@ jobs:
- name: "Download build artefacts 📥"
uses: actions/[email protected]
with:
name: ${{ matrix.directory }}-package
name: Packages-${{ matrix.directory }}
path: dist

- run: tar xf dist/*.tar.gz --strip-components=1

- name: "Upload to PyPI 🚀"
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
5 changes: 3 additions & 2 deletions docusaurus-docs/community/contribute/contribute-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ The new conda-store documentation website is built using [Docusaurus 2](https://
### Pre-requisites

1. Fork and clone the conda-store repository: `git clone https://github.com/<your-username>/conda-store.git`
2. Install [Node.js](https://nodejs.org/en), and verify the installation with `node -`v`
2. Install [Node.js](https://nodejs.org/en), and verify the installation with `node -v`

### Local development

:::note
You can also create an isolated environment for development.
:::

Navigate to the `/docusaurus-docs` directory, and run:
From the root of the repository, navigate to the `/docusaurus-docs` directory, and run:

```bash
npm install
Expand All @@ -33,6 +33,7 @@ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
The only time you'd need to restart the server is if you are making changes to the documentation site through the `docusaurus.config.js` file.

### Build website

Expand Down
4 changes: 2 additions & 2 deletions docusaurus-docs/community/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The conda-store development team pledges to create a welcoming, supportive, and

## Governance

As a [federated project](https://github.com/conda-incubator/governance/tree/main#federated-projects) under the [conda-incubator organization](https://github.com/conda-incubator), conda-store follows the [conda-incubator governance](https://github.com/conda-incubator/governance/tree/main#conda--conda-incubator-governance). The [conda-store development team (documented through GitHub Teams)](https://github.com/orgs/conda-incubator/teams) makes all project decisions using a [consent-based approach](https://www.sociocracyforall.org/consent-decision-making/) on the issue tracker or in team meetings.
As a [federated project](https://github.com/conda-incubator/governance/tree/main#federated-projects) under the [conda-incubator organization](https://github.com/conda-incubator), conda-store follows the [conda-incubator governance](https://github.com/conda-incubator/governance/tree/main#conda--conda-incubator-governance). The [conda-store development team (documented through GitHub Teams)](https://github.com/orgs/conda-incubator/teams/conda-store) makes all project decisions using a [consent-based approach](https://www.sociocracyforall.org/consent-decision-making/) on the issue tracker or in team meetings.

## Support

Expand All @@ -37,7 +37,7 @@ conda-store's issue trackers are the best way to reach the conda-store developme
* [conda-store-ui](https://github.com/conda-incubator/conda-store-ui/issues/new/choose)
* [jupyterlab-conda-store](https://github.com/conda-incubator/jupyterlab-conda-store/issues/new/choose)

If you are unsure about the repository, open your issues against the `conda-store`` repository and the development team will move it to the relevant space.
If you are unsure about the repository, open your issues against the `conda-store` repository and the development team will move it to the relevant space.

## Contribute

Expand Down
95 changes: 12 additions & 83 deletions docusaurus-docs/community/maintenance/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,89 +34,18 @@ For the release tag, there should be **NO** prepended `v`.

## Release process walkthrough

1. **Agree on a release schedule**. We aim to make a monthly conda-store release. Though this will depend on whether there are any `release-blocker` issues opened or team availability. The release captain should create an issue with the release date and assign themselves as the release captain.
2. **Ensure the main branch builds a package correctly**.
1. For conda-store and conda-store-server:
Each of the packages can be released independently.
However, it is recommended to make joint releases to ensure the latest version of `conda-store-ui` is used in `conda-store-server` and in the `jupyterlab-conda-store` extension.
To do so, the releases should be done in the following order:

```bash
# note you will need to run this twice, once for each package
cd conda-store # or cd conda-store-server
git clean -fxdq
hatch build
```
1. [`conda-store-ui`](https://github.com/conda-incubator/conda-store-ui)
2. [`conda-store-server` and `conda-store`](https://github.com/conda-incubator/conda-store)
3. [`jupyterlab-conda-store`](https://github.com/conda-incubator/jupyterlab-conda-store)

3. **Start a release**. Open an issue and copy & paste the release checklist. Then follow the steps indicated in the release checklist.
The release process is as follows:

:::warning
[jupyterlab-conda-store](https://github.com/conda-incubator/jupyterlab-conda-store) has a direct dependency on [conda-store-ui](https://github.com/conda-incubator/conda-store-ui). Make sure to release conda-store-ui before releasing jupyterlab-conda-store.
:::

### Release checklist (conda-store)

Create an [issue with the release template](https://github.com/conda-incubator/conda-store/issues/new?assignees=&labels=release+%F0%9F%8F%B7&projects=&template=new-release.md&title=%5BREL%5D+-+%3Crelease+number%3E), or copy & paste the steps below, to release a new conda-store version. Close the issue when it is done.

:::caution
There are two packages: the [conda-store](https://github.com/conda-incubator/conda-store) repository; [`conda-store`](https://github.com/conda-incubator/conda-store/tree/main/conda-store) and [`conda-store-server`](https://github.com/conda-incubator/conda-store/tree/main/conda-store-server). Make sure to update both packages when releasing a new version.
:::

```md
These steps should be taken to create a new release!
**Double-check for quality control**
## Release details
Scheduled release date - <yyyy/mm/dd>
Release captain responsible - <@gh_username>
---
### 1. Pre-flight checks
- [ ] Ensure there are no [open issues with a `block-release ⛔️` label](https://github.com/conda-incubator/conda-store/issues?q=is%3Aopen+label%3A%22block-release+%E2%9B%94%EF%B8%8F%22+sort%3Aupdated-desc)
### 2. Prepare the codebase for a new release
- [ ] Create a new git branch for the release `git checkout -b release-2023.9.1`
- [ ] Prepare the branch just in case `git clean -fxdq`
- [ ] Bump `conda-store` version in [`conda-store/conda-store/__init__.py`](https://github.com/conda-incubator/conda-store/blob/main/conda-store/conda_store/__init__.py)
- [ ] Bump `conda-store-server` version in [`conda-store-server/conda-store-server/__init__.py`](https://github.com/conda-incubator/conda-store/blob/main/conda-store/conda_store/__init__.py)
- [ ] Update the `conda-store-ui` version users in `conda-store-server` [`conda-store-server/hatch_build.py`](https://github.com/conda-incubator/conda-store/blob/main/conda-store-server/hatch_build.py)
- [ ] Update the [CHANGELOG.md](https://github.com/conda-incubator/conda-store/blob/main/CHANGELOG.md) file with the new version, release date, and relevant changes[^github-activity].
- [ ] Check the version locally with `hatch version`
- [ ] Build and test locally
- [ ] For `conda-store` and `conda-store-server`:
```bash
# note you will need to run this twice, once for each package
cd conda-store # or cd conda-store-server
hatch build
twine check dist/*
hatch clean
```
- [ ] Make a release commit: ``git commit -m 'REL - 2023.9.1'``
- [ ] Push the release (REL) commit ``git push upstream main``
- [ ] If a **release candidate** is needed, tick this box when we're ready for a full release.
### 3. Make the release
- [ ] [Start a new GitHub release](https://github.com/conda-incubator/conda-store/releases/new)
- Call the release the current version, e.g. `2023.9.1`
- In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `2023.9.1`) and click "Create new tag"
- In the **`Target:`** dropdown, pin it to the release commit that you've recently pushed.
- Add release notes in the field below[^github-activity], you can copy/paste the changelog from the [CHANGELOG.md](https://github.com/conda-incubator/conda-store/blob/main/CHANGELOG.md) file.
- [ ] Confirm that the release completed
- [The `release` GitHub action job](https://github.com/conda-incubator/conda-store/blob/main/.github/workflows/release.yaml) has completed successfully in the [actions tab](https://github.com/pydata/pydata-sphinx-theme/actions).
- [The `conda-store` PyPI version is updated](https://pypi.org/project/conda-store/)
- [The `conda-store-server` PyPI version is updated](https://pypi.org/project/conda-store-server/)
- [The Docker images have been published](https://github.com/conda-incubator/conda-store/blob/main/.github/workflows/build_docker_image.yaml)
- [ ] Update the [conda-forge feedstock version](https://github.com/conda-forge/conda-store-feedstock) through a PR or review and merge the regro-bot PR.
- [ ] If needed - update `meta.yaml` or `recipe.yaml` and re-render the feedstock.
- [ ] Celebrate, you're done! 🎉
[^github-activity]: If you wish, use [`github-activity` to generate a changelog](https://github.com/choldgraf/github-activity), eg `github-activity conda-incubator/conda-store --since 2023.9.1 --until 2023.10.1`.
```
<!-- TODO: Add conda-store-ui and jupyterlab -->
1. **Agree on a release schedule**. We aim to make a monthly conda-store release.
Though this will depend on whether there are any `release-blocker` issues opened or team availability.The release captain should create an issue with the release date and assign themselves as the release captain.
2. **Start a release**. The release captain should open a `New release` issue on the corresponding repository and assign the issue to themselves.
3. **Prepare and make the release**. The release captain should follow the checklist items in the `New release` issue
and close the release issues once this is done.

0 comments on commit 2352580

Please sign in to comment.