Skip to content

Release steam-acolyte v0.10.0 #112

Release steam-acolyte v0.10.0

Release steam-acolyte v0.10.0 #112

Workflow file for this run

name: Python Package
on:
push:
pull_request:
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -m pip install -U pip
- run: python -m pip install setuptools wheel
- run: python -m pip install flake8 twine
- run: python setup.py sdist bdist_wheel
- run: python -m pip install dist/*.whl
- run: twine check dist/*
- run: flake8
- name: Generate PKGBUILD
run: |
MD5SUM=$(md5sum dist/*.tar.gz | cut -d ' ' -f1)
VERSION=$(python -c 'import steam_acolyte as s;print(s.__version__)')
sed .github/PKGBUILD >dist/PKGBUILD \
-e "s/{{VERSION}}/$VERSION/" \
-e "s/{{MD5SUM}}/$MD5SUM/"
cat dist/PKGBUILD
- uses: actions/upload-artifact@v2
with:
name: dist
path: dist
if: startsWith(github.ref, 'refs/tags/v') &&
matrix.os == 'ubuntu-latest' &&
matrix.python == '3.8'
deploy:
name: Upload release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v') && success()
steps:
- uses: actions/download-artifact@v2
with:
name: dist
path: dist
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- run: pip install twine
- name: Extract release info
id: release
run: echo "::set-output name=tagname::${GITHUB_REF##*/}"
- name: Publish PyPI package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*.whl dist/*.tar.gz
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@50ce1d52e6d8cc06c1be5d58fabf2666c270f9f2
with:
pkgname: steam-acolyte
pkgbuild: dist/PKGBUILD
commit_message: Update to ${{ steps.release.outputs.tagname }}
commit_username: acolyte
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}