Skip to content

publish-python-client #263

publish-python-client

publish-python-client #263

name: publish-python-client
on:
workflow_run:
workflows: [build-and-test-python-client]
branches: [master]
types:
- completed
jobs:
publish-osparc_client:
name: Publish osparc_client wheel
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/osparc_client
permissions:
id-token: write
steps:
- name: Download wheels
run: gh run download ${{ github.event.workflow_run.id }}
- name: Remove osparc wheel
run: |
osparc_wheel=$(ls osparc_python_wheels/osparc-*)
rm -f ${osparc_wheel}
- name: Publish osparc_client to Test PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
packages-dir: osparc_python_wheels/
- name: Publish osparc_client to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: osparc_python_wheels/
publish-osparc:
name: Publish osparc wheel
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/osparc
permissions:
id-token: write
steps:
- name: Download wheels
run: gh run download ${{ github.event.workflow_run.id }}
- name: Remove osparc_client wheel
run: |
osparc_client_wheel=$(ls osparc_python_wheels/osparc_client*)
rm -f ${osparc_client_wheel}
- name: Publish osparc to Test PyPI
if: github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
packages-dir: osparc_python_wheels/
- name: Publish osparc to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
packages-dir: osparc_python_wheels/