This repository was archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 1.75 KB
/
wheel.yaml
File metadata and controls
74 lines (62 loc) · 1.75 KB
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
name: "Create Python distributions"
on:
workflow_dispatch: {}
jobs:
make-wheels:
name: Make ${{ matrix.os }} wheels
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
steps:
- name: "Checkout repo"
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: "Build wheels"
uses: pypa/cibuildwheel@v2.9.0
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- name: "Upload wheel as artifact"
uses: actions/upload-artifact@v3
with:
name: artifact-${{ matrix.os }}-wheel
path: ./wheelhouse/*.whl
make-sdist:
name: Make source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v3
with:
name: artifact-source-dist
path: dist/*.tar.gz
upload:
name: Checkout Artifacts
needs: [make-wheels, make-sdist]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: dist
- name: Copy artifacts to dist/ folder
run: |
echo "* Downloaded artifacts:"
ls dist/
cd dist/
echo "* Copying artifacts to dist/ folder:"
find . -mindepth 2 -maxdepth 2 -type f -print -exec mv {} . \;
echo "* Deleting empty directories:"
find . -maxdepth 1 -type d -empty -print -exec rmdir {} +
cd ..
echo "* Prepared artifacts:"
ls dist/