Skip to content

Release PyCyphal Workflow #89

Release PyCyphal Workflow

Release PyCyphal Workflow #89

Workflow file for this run

name: 'Release PyCyphal'
on:
workflow_run:
workflows: [ 'Test PyCyphal' ]
types: [ completed ]
# Ensures that only one workflow is running at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pycyphal-release:
name: Release PyCyphal
runs-on: ubuntu-latest
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/tags/#release') && github.event.workflow_run.conclusion == 'success'
steps:
- name: Check out
uses: actions/checkout@v3
- name: Install dependencies
run: |
git submodule update --init --recursive
python -m pip install --upgrade pip setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Get release version
run: |
cd pycyphal
echo "pycyphal_version=$(python -c 'from _version import __version__; print(__version__)')" >> $GITHUB_ENV
- name: Upload distribution
run: |
echo 'python -m twine upload dist/*'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_PYCYPHAL }}
# - name: Push version tag
# uses: mathieudutour/[email protected]
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# custom_tag: ${{ env.pycyphal_version }}
# tag_prefix: ''