-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (42 loc) · 1.21 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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: Trigger webhook
run: curl -X POST $RELEASE_WEBHOOK_URL --fail
env:
RELEASE_WEBHOOK_URL: ${{ secrets.RELEASE_WEBHOOK_URL }}