Skip to content

Release BlueChi 0.6.0 #6

Release BlueChi 0.6.0

Release BlueChi 0.6.0 #6

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*.*.*'
jobs:
ghrelease:
name: Create GitHub release for BlueChi
runs-on: ubuntu-latest
container:
image: quay.io/bluechi/build-base:latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'true'
- name: Build source rpm
run: |
./build-scripts/build-srpm.sh
- name: Create source zip and tarball
run: |
mkdir -p /tmp/bluechi-${{ github.ref_name }}
cp -r ./ /tmp/bluechi-${{ github.ref_name }}/
rm -rf /tmp/bluechi-${{ github.ref_name }}/.git/
mv /tmp/bluechi-${{ github.ref_name }}/ ./
zip -r bluechi-${{ github.ref_name }}.zip ./bluechi-${{ github.ref_name }}/
tar czf bluechi-${{ github.ref_name }}.tar.gz ./bluechi-${{ github.ref_name }}/
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
prerelease: false
draft: false
token: ${{ secrets.GH_RELEASE_TOKEN }}
files: |
bluechi-${{ github.ref_name }}.zip
bluechi-${{ github.ref_name }}.tar.gz
rpmbuild/SRPMS/*.src.rpm
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/