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

Remove push event trigger for the release workflow #5268

Closed
wants to merge 1 commit into from
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/gh-action-pypi-publish@v1.4.2
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