Skip to content

v2.6.0

v2.6.0 #50

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/*
# This step triggers the publish-amis workflow here
# https://github.com/tidalmigrations/Infrastructure-templates/blob/main/.github/workflows/publish-images.yml
- name: Trigger publish-ami workflow
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN_GITHUB }}" \
--data '{"event_type":"publish_amis"}' \
https://api.github.com/repos/tidalmigrations/Infrastructure-templates/dispatches
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/*