-
Notifications
You must be signed in to change notification settings - Fork 32
51 lines (44 loc) · 1.54 KB
/
publish-to-pypi.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
name: Wheel building
on:
pull_request:
# We also want this workflow triggered if the 'Build all wheels'
# label is added or present when PR is updated
types:
- synchronize
- labeled
push:
branches:
- master
tags:
- '*'
permissions:
contents: read
jobs:
build_and_publish:
# This job builds the wheels and publishes them to PyPI for all
# tags. For PRs with the "Build wheels" label, wheels are built,
# but are not uploaded to PyPI.
permissions:
contents: none
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v1
if: (github.repository == 'spacetelescope/spherical_geometry' && (github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'Build wheels')))
with:
# We upload to PyPI for all tag pushes
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
test_extras: test
test_command: pytest -p no:warnings --pyargs spherical_geometry -v
targets: |
# Linux wheels
- cp3*-manylinux_x86_64
- cp3*-musllinux_x86_64
- cp3*-manylinux_aarch64
# MacOS X wheels - we deliberately do not build universal2 wheels.
# Note that the arm64 wheels are not actually tested so we
# rely on local manual testing of these to make sure they are ok.
- cp3*macosx_x86_64
- cp3*macosx_arm64
# Windows wheels
- cp3*win32
- cp3*win_amd64
secrets:
pypi_token: ${{ secrets.PYPI_TOKEN }}