... | ... |
@@ -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/* |
... | ... |
@@ -12,7 +12,7 @@ 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 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 |
|
16 | 16 |
- name: build |
17 | 17 |
run: python3 setup.py sdist |
18 | 18 |
- name: test |
... | ... |
@@ -13,6 +13,8 @@ jobs: |
13 | 13 |
run: sudo apt-get update -qq |
14 | 14 |
- name: apt-install |
15 | 15 |
run: sudo apt-get install -qq -y --no-install-recommends gir1.2-gtk-3.0 python3-gi python3-gi-cairo python3-numpy graphviz xvfb |
16 |
+ - name: build |
|
17 |
+ run: python3 setup.py sdist |
|
16 | 18 |
- name: test |
17 | 19 |
run: .github/scripts/test.sh |
18 | 20 |
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+name: build |
|
2 |
+ |
|
3 |
+on: [push] |
|
4 |
+ |
|
5 |
+jobs: |
|
6 |
+ build: |
|
7 |
+ runs-on: ubuntu-latest |
|
8 |
+ steps: |
|
9 |
+ - uses: actions/checkout@v2 |
|
10 |
+ with: |
|
11 |
+ fetch-depth: 1 |
|
12 |
+ - name: apt-update |
|
13 |
+ run: sudo apt-get update -qq |
|
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 graphviz xvfb |
|
16 |
+ - name: test |
|
17 |
+ run: .github/scripts/test.sh |
|
18 |
+ # https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ |
|
19 |
+ # TODO: https://packaging.python.org/guides/using-testpypi/ ? |
|
20 |
+ - name: publish-pypi |
|
21 |
+ if: startsWith(github.ref, 'refs/tags') |
|
22 |
+ uses: pypa/gh-action-pypi-publish@master |
|
23 |
+ with: |
|
24 |
+ password: ${{ secrets.pypi_password }} |