-
-
Notifications
You must be signed in to change notification settings - Fork 138
72 lines (60 loc) · 2.17 KB
/
publish.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
name: Wheel building
on:
schedule:
# run every day at 4:30am UTC
- cron: '30 4 * * *'
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:
- '*'
tags:
- '*'
- '!*dev*'
- '!*pre*'
- '!*post*'
workflow_dispatch:
permissions:
contents: read
jobs:
build_and_publish:
# This job builds the wheels and publishes them to PyPI for all
# tags, except those ending in ".dev". For PRs with the "Build all
# wheels" label, wheels are built, but are not uploaded to PyPI.
permissions:
contents: none
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
if: (github.repository == 'astropy/photutils' && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Build all wheels')))
with:
# We upload to PyPI for all tag pushes, except tags ending in .dev
upload_to_pypi: ${{ startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '.dev') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
test_extras: test
test_command: pytest -p no:warnings --pyargs photutils
targets: |
# Linux wheels
- cp311-manylinux_x86_64
- cp312-manylinux_x86_64
- cp313-manylinux_x86_64
# MacOS X wheels
- cp311*macosx_x86_64
- cp312*macosx_x86_64
- cp313*macosx_x86_64
- cp311*macosx_arm64
- cp312*macosx_arm64
- cp313*macosx_arm64
# Windows wheels
- cp311*win_amd64
- cp312*win_amd64
- cp313*win_amd64
# Developer wheels
upload_to_anaconda: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
anaconda_user: astropy
anaconda_package: photutils
anaconda_keep_n_latest: 10
secrets:
pypi_token: ${{ secrets.pypi_token }}
anaconda_token: ${{ secrets.anaconda_token }}