Skip to content
Closed
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
9 changes: 1 addition & 8 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ on:
release:
types:
- published
push:
branches:
- master

jobs:
build-artifacts:
runs-on: ubuntu-latest
if: github.repository == 'pydata/xarray'
if: github.repository == 'pydata/xarray' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -63,16 +60,13 @@ jobs:
ls -ltrh
ls -ltrh dist
- name: Publish package to TestPyPI
if: github.event_name == 'push' || startsWith(github.event.ref, 'refs/tags/v')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TESTPYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true

- name: Check uploaded package
if: github.event_name == 'push' || startsWith(github.event.ref, 'refs/tags/v')
run: |
sleep 3
python -m pip install --upgrade pip
Expand All @@ -81,7 +75,6 @@ jobs:

upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release' && startsWith(github.event.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
Expand Down