Skip to content

v1.0.0-alpha3

v1.0.0-alpha3 #4

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Build and Publish Python package
on:
release:
types: [published]
jobs:
build:
# needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependency
run: |
sudo apt-get update
sudo apt-get -y install libvirt-dev pkg-config python3-dev
- name: Set up Python 3.x
uses: actions/[email protected]
with:
python-version: '3.x'
- name: Extract version from tag
id: extract_version
run: echo "PROJECT_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Update version.py
run: python version_update.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install --upgrade build wheel setuptools
- name: Build package
run: python setup.py build
- name: Build distribution
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}