-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (49 loc) · 1.46 KB
/
wheels.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
55
56
57
58
name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-12, windows-2019]
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
with:
package-dir: mrobpy
- name: Check repo consistency
run: git status --porcelain
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
publish_pypi:
name: Publish wheels to PyPI
needs: build_wheels
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: wheels/
verbose: true
publish-github-release:
name: Publish wheels to GitHub Releases
needs: build_wheels
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
- uses: softprops/action-gh-release@v1
with:
files: wheels/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}