Test run deployment #108
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Release PyCyphal Workflow' | |
on: | |
push: | |
branch: [ master ] | |
tag: [ '#release' ] | |
# 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 | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Wait for test job to complete | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.sha }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 10 | |
running-workflow-name: 'Release PyCyphal' | |
allowed-conclusions: success,skipped,cancelled | |
- name: Create distribution wheel | |
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: | | |
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: '' | |