Skip to content

Commit

Permalink
Properly filter release/prerelease actions (#106)
Browse files Browse the repository at this point in the history
* Properly filter release/prerelease actions

* Update pythonpublish.yaml
  • Loading branch information
jbusecke committed Jun 23, 2021
1 parent 1960d26 commit 4c001df
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/pythonpublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ name: Build and Upload xarrayutils to PyPI
on:
release:
types:
- published
push:
tags:
- 'v*rc*' # only trigger this for dev releases (which I currently call release candidates...
- published #this will be triggered by any kind of release. Pre releases are uploaded to testpypi and real releases to pypi

jobs:
build-artifacts:
Expand Down Expand Up @@ -51,6 +48,7 @@ jobs:

test-built-dist:
needs: build-artifacts
if: github.event.release.prerelease
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
Expand Down Expand Up @@ -89,7 +87,7 @@ jobs:
python -c "import xarrayutils;print(xarrayutils.__version__)"
upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release'
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
Expand Down

0 comments on commit 4c001df

Please sign in to comment.