forked from madprime/python-gedcom
-
-
Notifications
You must be signed in to change notification settings - Fork 44
64 lines (53 loc) · 1.66 KB
/
release.yml
File metadata and controls
64 lines (53 loc) · 1.66 KB
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
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
on:
release:
types: [created]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.5
uses: actions/setup-python@v1
with:
python-version: 3.5
- name: Install pipenv
run: >-
pip install pipenv
- name: Install dependencies
run: >-
pipenv install -d
- name: Run tests
run: >-
pipenv run tox -e py35
- name: Build a binary wheel and a source tarball
run: >-
pipenv run python setup.py sdist bdist_wheel
- name: Publish distribution 📦 to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: >-
pipenv run twine upload dist/*
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
run: >-
pipenv run twine upload dist/*
- name: Generate docs
run: >-
pipenv run pdoc3 --html -o docs/ gedcom --force
- name: Publish docs
uses: EndBug/add-and-commit@v4
with:
author_name: ${{ secrets.AUTHOR_NAME }}
author_email: ${{ secrets.AUTHOR_EMAIL }}
message: "docs: added new documentation"
add: "docs/*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}