-
-
Notifications
You must be signed in to change notification settings - Fork 79
51 lines (48 loc) · 1.49 KB
/
publish_pypi.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
name: Publish To Pypi
on:
release:
types: [published]
jobs:
linux-build:
name: "Build and package: manylinux"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build manylinux Python wheels
uses: RalfG/python-wheels-manylinux-build@v0.3.4-manylinux2014_x86_64
with:
python-versions: "cp37-cp37m cp38-cp38 cp39-cp39"
build-requirements: "torch"
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_KEY }}
run: |
twine upload dist/*
mac-windows-build:
name: "Build and package: ${{ matrix.os }} v${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
run: |
pip install setuptools wheel pytest-xdist tensorboard matplotlib
pip install -e .
- name: Run unit tests
run: pytest -n auto norse
- name: Build wheel
run: python setup.py bdist_wheel sdist
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_KEY }}
run: |
twine upload dist/*