-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (53 loc) · 1.98 KB
/
Copy pathpythonpublish-win.yml
File metadata and controls
56 lines (53 loc) · 1.98 KB
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
name: Python packages Windows
on:
release:
types: [published]
push:
jobs:
build:
runs-on: windows-2019
strategy:
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- name: add qt dir to path
run: |
echo "C:\Program Files\LLVM\bin;${{github.workspace}}\Qt\6.4.3\mingw_64\bin;C:\msys64\mingw64\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
- name: Install deps and build package
env:
CLANG_INSTALL_DIR: C:\Program Files\LLVM\
run: |
pip install --upgrade "meson" "ninja" "numpy" "meson-python" "build" "wheel" "twine" "auditwheel" "aqtinstall"
pip install "PySide6==6.4.3"
pip install --index-url=http://download.qt.io/official_releases/QtForPython/ --trusted-host download.qt.io "shiboken6_generator==6.4.3"
aqt install-qt -O $env:GITHUB_WORKSPACE\Qt windows desktop 6.4.3 win64_mingw
python3 -m build --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