-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (52 loc) · 1.97 KB
/
pythonpublish-win.yml
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
name: Python packages Windows
on:
release:
types: [published]
push:
jobs:
build:
runs-on: windows-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
pyside_ver: ['6.6.0']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: add qt dir to path
run: |
echo "${{github.workspace}}\Qt\${{ matrix.pyside_ver }}\msvc2019_64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Set python interpreter
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Install deps
run: |
pip install --upgrade "meson" "ninja" "numpy" "meson-python>=0.14.0" "build" "wheel" "twine" "auditwheel" "aqtinstall"
pip install "PySide6==${{ matrix.pyside_ver }}"
pip install --index-url=http://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io "shiboken6_generator==${{ matrix.pyside_ver }}"
aqt install-qt -O $env:GITHUB_WORKSPACE\Qt windows desktop ${{ matrix.pyside_ver }} win64_msvc2019_64
- name: Build package
run: |
python3 -m build --wheel --no-isolation .
- name: Save packages as artifacts
uses: actions/upload-artifact@v3
with:
name: sciqlopplots-windows-${{ matrix.python-version }}
path: dist/*
- name: Publish on PyPi
if: github.event.release
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload --skip-existing dist/*
- name: Publish on PyPi (test)
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }}
run: twine upload --repository testpypi --skip-existing dist/*.whl