Skip to content

Update release workflows #10408

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 9 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ on:
push:
tags:
- "v*"
pull_request:
types: [opened, reopened, synchronize, labeled]
workflow_dispatch:

jobs:
build-artifacts:
runs-on: ubuntu-latest
if: github.repository == 'pydata/xarray'
if: ${{ github.repository == 'pydata/xarray' && (
(contains(github.event.pull_request.labels.*.name, 'Release') && github.event_name == 'pull_request') ||
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
startsWith(github.ref, 'refs/tags/v')
) }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -64,7 +72,6 @@ jobs:
ls -ltrh dist

- name: Verify the built dist/wheel is valid
if: github.event_name == 'push'
run: |
python -m pip install --upgrade pip
python -m pip install dist/xarray*.whl
Expand Down
2 changes: 2 additions & 0 deletions HOW_TO_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ upstream https://github.com/pydata/xarray (push)
release.
5. Open a PR with the release summary and whatsnew changes; in particular the
release headline should get feedback from the team on what's important to include.
Apply the `Release` label to the PR to trigger a test build action.

6. After merging, again ensure your main branch is synced to upstream:
```sh
git pull upstream main
Expand Down
Loading