Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pypi-win.yml « workflows « .github - github.com/kliment/Printrun.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77c06faf62dcdee2e04c13a41fc7d0bae3e80307 (plain)
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
name: Build Windows Python package

on:
  push:
  pull_request:
  release:
    types:
      - created

jobs:
  build:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [windows-latest]
        architecture: [x64, x86]
        python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        architecture: ${{ matrix.architecture }}
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel twine cython
    - name: Build Python wheel
      run: |
        python setup.py bdist_wheel
    - name: Upload artifacts for inspection
      uses: actions/upload-artifact@v2
      with:
        name: wheel_${{ matrix.os }}_${{ matrix.architecture }}_${{ matrix.python-version }}
        path: dist/*.whl
    - name: Publish sdists and wheels to PyPI
      if: ${{ success() && github.event_name == 'release' && github.event.action == 'created' }}
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
      run: |
        twine upload dist/*