Skip to content

v2.7.0

v2.7.0 #51

Workflow file for this run

name: PyPI Upload
on:
release:
types: [ created ]
jobs:
machine_stats:
name: Machine Stats PyPI Upload
runs-on: ubuntu-latest
defaults:
run:
working-directory: unix
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: 3.8
architecture: x64
- name: Autobump version
run: |
# from refs/tags/v1.2.3 get 1.2.3
VERSION=${GITHUB_REF/refs\/tags\//}
PLACEHOLDER='version="develop"'
VERSION_FILE='setup.py'
# grep ensures the placeholder is there. If grep doesn't find the placeholder
# it exits with exit code 1 and github actions aborts the build.
grep "$PLACEHOLDER" "$VERSION_FILE"
sed -i "s/$PLACEHOLDER/version=\"${VERSION}\"/g" "$VERSION_FILE"
- name: Install pypa/build and twine
run: |
python -m pip install build twine
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/ .
- name: Upload to PyPI via Twine
env:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose -u '__token__' dist/*
virt_stats:
name: Virt Stats PyPI Upload
runs-on: ubuntu-latest
defaults:
run:
working-directory: libvirt
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: 3.8
architecture: x64
- name: Autobump version
run: |
# from refs/tags/v1.2.3 get 1.2.3
VERSION=${GITHUB_REF/refs\/tags\//}
PLACEHOLDER='version="develop"'
VERSION_FILE='setup.py'
# grep ensures the placeholder is there. If grep doesn't find the placeholder
# it exits with exit code 1 and github actions aborts the build.
grep "$PLACEHOLDER" "$VERSION_FILE"
sed -i "s/$PLACEHOLDER/version=\"${VERSION}\"/g" "$VERSION_FILE"
- name: Install pypa/build and twine
run: |
python -m pip install build twine
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/ .
- name: Upload to PyPI via Twine
env:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload --verbose -u '__token__' dist/*