...
|
...
|
@@ -12,15 +12,15 @@ jobs:
|
12
|
12
|
- name: apt-update
|
13
|
13
|
run: sudo apt-get update -qq
|
14
|
14
|
- name: apt-install
|
15
|
|
- run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy python3-setuptools graphviz xvfb
|
|
15
|
+ run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy python3-setuptools graphviz xvfb twine
|
16
|
16
|
- name: build
|
17
|
17
|
run: python3 setup.py sdist
|
18
|
18
|
- name: test
|
19
|
19
|
run: .github/scripts/test.sh
|
20
|
|
- # https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
|
21
|
|
- # TODO: https://packaging.python.org/guides/using-testpypi/ ?
|
|
20
|
+ # https://docs.github.com/en/actions/guides/building-and-testing-python#publishing-to-package-registries
|
22
|
21
|
- name: publish-pypi
|
23
|
|
- if: startsWith(github.ref, 'refs/tags')
|
24
|
|
- uses: pypa/gh-action-pypi-publish@master
|
25
|
|
- with:
|
26
|
|
- password: ${{ secrets.pypi_password }}
|
|
22
|
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
23
|
+ env:
|
|
24
|
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
25
|
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
26
|
+ run: twine upload dist/*
|