Browse code

github: Use twine directly.

Jose Fonseca authored on 21/02/2021 21:53:22
Showing 1 changed files
... ...
@@ -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/*
Browse code

github: Build on pull requests.

Jose Fonseca authored on 08/12/2020 10:28:54
Showing 1 changed files
... ...
@@ -1,6 +1,6 @@
1 1
 name: build
2 2
 
3
-on: [push]
3
+on: [push, pull_request]
4 4
 
5 5
 jobs:
6 6
   build:
Browse code

github: Add missing python3-setuptools dependency.

Jose Fonseca authored on 21/11/2020 11:53:12
Showing 1 changed files
... ...
@@ -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
Browse code

github: build source distribution.

Jose Fonseca authored on 21/11/2020 11:43:57
Showing 1 changed files
... ...
@@ -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/
Browse code

github: Migrate from Travis CI to GitHub Actions.

Jose Fonseca authored on 21/11/2020 11:34:37
Showing 1 changed files
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 }}