Skip to content

Commit

Permalink
Update python-app.yml
Browse files Browse the repository at this point in the history
only publish on ubuntu
  • Loading branch information
AWehrhahn authored Apr 4, 2022
1 parent c56e1bf commit 0f6d039
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,29 @@ jobs:
run: pytest

- name: GitHub Tag
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && matrix.name == 'ubuntu'
id: tag_release
uses: mathieudutour/github-tag-action@v5
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v2
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && matrix.name == 'ubuntu'
with:
ref: ${{ steps.tag_release.outputs.new_tag }}
clean: false

- name: Build Wheel
if: matrix.name == 'ubuntu
run: pip install wheel && python setup.py sdist bdist_wheel

- name: Zip data
if: matrix.name == 'ubuntu
id: zip_data
run: zip -r dist dist && echo "::set-output name=filename::dist.zip"

- name: Create Release
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && matrix.name == 'ubuntu'
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -97,7 +99,7 @@ jobs:
prerelease: false

- name: Upload Release Asset
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && matrix.name == 'ubuntu'
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
Expand All @@ -109,7 +111,7 @@ jobs:
asset_content_type: application/zip

- name: Publish a Python distribution to PyPI
if: github.event_name != 'pull_request'
if: github.event_name != 'pull_request' && matrix.name == 'ubuntu'
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
Expand Down

0 comments on commit 0f6d039

Please sign in to comment.