From 0f6d03937882f9569e7ae990c30d3fa88c70e9e9 Mon Sep 17 00:00:00 2001 From: Ansgar Wehrhahn Date: Mon, 4 Apr 2022 14:32:17 +0200 Subject: [PATCH] Update python-app.yml only publish on ubuntu --- .github/workflows/python-app.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 84be7271..d7436285 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -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: @@ -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: @@ -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__