-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (73 loc) · 2.27 KB
/
build-new.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: pytlsd build and publish
on:
push:
branches:
- master
pull_request:
types: [ assigned, opened, synchronize, reopened ]
release:
types: [ published, edited ]
workflow_dispatch:
jobs:
linux-build:
name: Wrapper Linux Build
runs-on: ubuntu-latest
strategy:
matrix:
platform: [ manylinux2014_x86_64 ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build the Linux wheels
run: |
sudo docker run --rm -e PLAT=${{ matrix.platform }} -v `pwd`:/io quay.io/pypa/${{ matrix.platform }} /io/package/build-wheels-linux.sh
# cleanup for custom runner
sudo chown -R $(whoami):$(whoami) .
- name: Archive wheels
uses: actions/upload-artifact@v3
with:
# we strip the version number from the artifact name
name: pytlsd-${{ matrix.platform }}
path: wheelhouse/pytlsd-*.whl
mac-build:
name: Wrapper macOS Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-11, macos-12 ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build the macOS wheels
run: |
./package/build-wheels-macos.sh
- name: Archive wheels
uses: actions/upload-artifact@v3
with:
name: pytlsd-${{ matrix.os }}
path: ./wheelhouse/pytlsd-*.whl
# pypi-publish:
# name: Publish wheels to PyPI
# needs: [ linux-build, mac-build ]
# runs-on: ubuntu-latest
# # We publish the wheel to pypi when a new tag is pushed,
# # either by creating a new GitHub release or explictly with `git tag`
# if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }}
# steps:
# - name: Download wheels
# uses: actions/download-artifact@v3
# with:
# path: ./artifacts/
# - name: Move wheels
# run: mkdir ./wheelhouse && mv ./artifacts/**/*.whl ./wheelhouse/
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# skip_existing: true
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# packages_dir: ./wheelhouse/