-
Notifications
You must be signed in to change notification settings - Fork 14
102 lines (85 loc) · 2.41 KB
/
release.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: release
on:
push:
tags:
- '*'
branches-ignore:
- '*'
jobs:
build_sdist:
name: sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build sdist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v2
with:
path: dist/*.tar.gz
build_wheels:
name: ${{ matrix.platform }}
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- image: ubuntu-latest
platform: linux
- image: macos-latest
platform: macos
- image: windows-latest
platform: windows
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache Conan
id: cache-conan
uses: actions/cache@v3
if: matrix.platform == 'windows'
with:
path: |
conan_build
conan_data
key: conan-${{ matrix.image }}-${{ hashFiles('conanfile.txt') }}
- name: Configure Python
uses: actions/setup-python@v4
if: matrix.platform == 'windows' && steps.cache-conan.outputs.cache-hit != 'true'
with:
python-version: '3.x'
- name: Install Conan
if: matrix.image == 'windows-latest' && steps.cache-conan.outputs.cache-hit != 'true'
run: |
pip install pip --upgrade
pip install conan<2.0.0
conan profile new default --detect
conan profile update "settings.compiler=Visual Studio" default
conan profile update "settings.compiler.version=17" default
conan config set "storage.path=$env:GITHUB_WORKSPACE/conan_data"
conan install --build=openssl --install-folder conan_build .
- uses: pypa/[email protected]
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
upload:
name: upload
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: jonathf
password: ${{ secrets.pypi_password }}