Skip to content

Added make-release workflow conditions #97

Added make-release workflow conditions

Added make-release workflow conditions #97

Workflow file for this run

name: 'Release PyCyphal'
on:
push:
branch: [ master, issue-259 ]
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: Create PyCyphal release
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.ref }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
running-workflow-name: 'Create PyCyphal release'
- 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: |
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: ''