Skip to content

Commit

Permalink
add checkout to deploy step, add job condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ihumphrey committed Feb 18, 2022
1 parent d57bf25 commit 861441c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/fvGP-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,23 @@ jobs:
verbose: true

deploy:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Setup deploy
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand All @@ -70,7 +71,6 @@ jobs:

- name: Github Release
uses: fnkr/github-action-ghr@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
env:
GHR_COMPRESS: xz
GHR_PATH: build/
Expand Down

0 comments on commit 861441c

Please sign in to comment.