Release #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
pkgrel: | |
description: 'Package release (12345.X)' | |
required: false | |
default: '1' | |
jobs: | |
release-hearthstone-data-job: | |
name: Release hearthstone-data | |
runs-on: ubuntu-latest | |
permissions: | |
# required to authenticate for the PyPi upload below | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies | |
run: sudo apt-get update && sudo apt-get -y install libxml2-utils | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install Python dependencies | |
run: pip install wheel | |
- name: Bootstrap | |
run: ./bootstrap.sh | |
- name: Build | |
run: python setup.py sdist bdist_wheel | |
env: | |
PKGREL: ${{ github.event.inputs.pkgrel }} | |
- name: Upload to pypi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
notify: | |
name: Notify webhook about the release | |
needs: [release-hearthstone-data-job] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Give PyPi a moment to update it's caches | |
run: sleep 5m | |
- name: Trigger webhook | |
run: curl -X POST $RELEASE_WEBHOOK_URL --fail | |
env: | |
RELEASE_WEBHOOK_URL: ${{ secrets.RELEASE_WEBHOOK_URL }} |