-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (69 loc) · 2.2 KB
/
build-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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: build-wheel
on:
push:
jobs:
wheels:
name: Building wheel on ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04]
python: [cp38,cp39,cp310,cp311]
arch: [x86_64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get dakota src
run: make get-dakota-src
- uses: pypa/cibuildwheel@v2.16
env:
CIBW_BUILD: ${{ matrix.python }}*${{ matrix.arch }}
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.arch }}
path: wheelhouse/*.whl
test-pypi:
name: Publish wheels on Test PyPI
runs-on: ubuntu-latest
needs:
- wheels
environment:
name: testpypi
url: https://test.pypi.org/p/itis-dakota
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
pypi:
name: Publish wheels on PyPI
runs-on: ubuntu-latest
needs:
- wheels
- publish-to-testpypi
if: github.ref == 'refs/heads/master'
environment:
name: pypi
url: https://pypi.org/p/itis-dakota
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1