Release PyCyphal Workflow #85
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' | |
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/issue-259' || 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 | |
echo "*****" | |
echo $GHREF | |
env: | |
GHREF: ${{ github.ref }} | |
- 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: '' | |
# if: ${{ (github.ref == 'refs/head/issue-259' || github.ref == 'refs/tags/#release') && github.event.workflow_run.conclusion == 'success' }} |