-
Notifications
You must be signed in to change notification settings - Fork 37
66 lines (66 loc) · 2.26 KB
/
deploy.yaml
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
65
66
name: Deploy
on:
push:
branches: [ master ]
tags: [ v* ]
jobs:
python-build:
strategy:
matrix:
pyver:
- "3.8"
- "3.9"
- "3.10"
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
steps:
- uses: actions/checkout@v2
- run: git submodule update --init
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyver }}
- name: Build and test
run: |
python -m pip install -U pip setuptools wheel build
python -m pip install -e .
- if: matrix.pyver == '3.10' && matrix.os == 'ubuntu-latest'
name: Pack (AppImage)
run: ./scripts/appimage.sh
- if: matrix.pyver == '3.10' && matrix.os != 'ubuntu-latest'
name: Pack (PyInstaller)
shell: bash
run: ./scripts/pyinstaller.sh
- if: matrix.pyver == '3.10' && matrix.os == 'ubuntu-latest'
name: Upload artifact (AppImage)
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-py${{ matrix.pyver }}
path: out/*.AppImage
- if: matrix.pyver == '3.10' && matrix.os != 'ubuntu-latest'
name: Upload artifact (PyInstaller)
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-py${{ matrix.pyver }}
path: dist/*.zip
- if: startsWith(github.ref, 'refs/tags/v') && matrix.pyver == '3.10' && matrix.os == 'ubuntu-latest'
name: Upload binaries to release (AppImage)
uses: softprops/action-gh-release@v1
with:
files: out/*.AppImage
- if: startsWith(github.ref, 'refs/tags/v') && matrix.pyver == '3.10' && matrix.os != 'ubuntu-latest'
name: Upload binaries to release (PyInstaller)
uses: softprops/action-gh-release@v1
with:
files: dist/*.zip
- if: startsWith(github.ref, 'refs/tags/v') && matrix.pyver == '3.10' && matrix.os == 'ubuntu-latest'
name: PyPI release
run: |
python -m pip install twine
python -m build --wheel
python -m twine upload "dist/*.whl" --skip-existing