Publish #2
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: Publish | |
on: | |
workflow_dispatch: | |
jobs: | |
pypipublish: | |
name: Publish bluechi on PyPi | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/bluechi/build-base:latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Install dependencies | |
run: | | |
python3 -m ensurepip --default-pip | |
python3 -m pip install --upgrade pip setuptools wheel build | |
python3 -m pip install -r src/bindings/generator/requirements.txt | |
- name: Generate python bindings | |
run: | | |
bash build-scripts/generate-bindings.sh python | |
- name: Check for changes in generated python code | |
run: | | |
git config --global --add safe.directory $(pwd) | |
git diff --exit-code src/bindings/python/ | |
- name: Prompt rebuilding python bindings | |
if: ${{ failure() }} | |
run: | | |
echo "Changes in D-Bus API spec detected. Please generated them." | |
- name: Build python bindings package | |
run: | | |
bash build-scripts/build-bindings.sh python | |
- name: Publish bluechi to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: src/bindings/python/dist/ |