generated from scheibling/pytemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 935 Bytes
/
publish.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
on:
release:
types: [published]
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt -r requirements.txt
pip install setuptools wheel twine pdoc3
- name: Build and publish
env:
RELEASE_NAME: ${{ github.event.release.tag_name }}
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Rebuild documentation
run: |
pdoc --html src/pytemplate/ --force --output-dir docs
mv docs/pytemplate/* docs/
rm -r docs/pytemplate