68 lines (63 loc) · 1.7 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
release:
types: [released]
# set environment variables
env:
TOKEN: ${{ secrets.GH_TOKEN }}
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PW }}
jobs:
# release to PyPI
release-pypi:
name: Release to PyPI
runs-on: ubuntu-latest
steps:
# check out repo
- uses: actions/checkout@v2
with:
fetch-depth: 1
# install python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
# install pythonn dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# release new version to PyPI
- run: |
make upgrade-dist-tools
make dist
make upload
release-docs:
name: Release Docs
runs-on: ubuntu-latest
steps:
# check out repo
- uses: actions/checkout@v2
with:
fetch-depth: 1
# install python
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
# install pythonn dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# release latest docs
- run: make publish-docs
notification:
name: Google chat notification about release and published version
needs: [release-pypi, release-docs]
runs-on: ubuntu-latest
steps:
- name: Send notification to google chat room "DSP releases"
uses: lakto/google-chat-action@main
with:
url: ${{ secrets.GOOGLE_CHAT_DSP_RELEASES_WEBHOOK_URL }}