-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (56 loc) · 1.85 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
name: Release Actions
on:
workflow_dispatch:
release:
types: [published]
jobs:
upload-pypi:
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Checkout Current Repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt install python3-dev
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python3 -m pip install twine
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build wheels with cibuildwheels
uses: pypa/cibuildwheel@v2.21.2
env:
CIBW_ARCHS_LINUX: aarch64 native armv7l
CIBW_SKIP: cp36* pp* *ppc64le *s390x
- name: Move cross-compiled wheels to dist folder
run: |
mkdir -p dist
mv ./wheelhouse/*.whl ${{ github.workspace }}/dist/
- name: build source distributable wheel
# sdist for non-supprted platforms will serve as a stub lib install
run: |
python -m pip install build
python -m build -s
- name: Save distributable wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: "pyRF24_pkg_dist"
path: ${{ github.workspace }}/dist
- name: Publish package (to TestPyPI)
if: github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@v1.10.3
with:
repository-url: https://test.pypi.org/legacy/
- name: Publish to PyPi
# only upload distributions to PyPi when triggered by a published release
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@v1.10.3