-
-
Notifications
You must be signed in to change notification settings - Fork 38
46 lines (39 loc) · 1.35 KB
/
build_windows.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
name: Build and upload Windows Python Package
on: [pull_request, release]
jobs:
deploy:
runs-on: windows-2019
env:
HAS_SECRETS: ${{ secrets.AWS_SECRET_ACCESS_KEY != '' }}
continue-on-error: true
strategy:
matrix:
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11']
architecture: ['x64']
steps:
- uses: actions/checkout@v3
- name: Set Python environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
pip install -r requirements.txt
pip install -r requirements_additional.txt
- name: Build
run: python setup.py bdist_wheel
- name: Stores artifacts along with the workflow result
# if: ${{ github.event_name == 'push'}}
uses: actions/upload-artifact@v3
with:
name: library
path: dist/*.whl
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
- name: Publish
if: ${{ (github.event_name == 'release') && (env.HAS_SECRETS == 'true') }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*.whl