1515 pull_request :
1616 # Allow manual runs through the web UI
1717 workflow_dispatch :
18- # Trigger on completion of the scheduled_builds.yml file (only on main)
19- workflow_run :
20- workflows : [Scheduled build triggerer]
2118
2219concurrency :
2320 group : ${{ github.workflow }}-${{ github.ref }}
2421 cancel-in-progress : true
2522
23+ permissions : {}
24+
2625jobs :
2726 core :
28- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
27+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
2928 with :
3029 submodules : false
3130 coverage : codecov
@@ -39,11 +38,10 @@ jobs:
3938 sdist_verify :
4039 runs-on : ubuntu-latest
4140 steps :
42- - uses : actions/checkout@v6
41+ - uses : actions/checkout@v6 # zizmor: ignore[unpinned-uses]
4342 with :
44- fetch-tags : true
45- fetch-depth : 0
46- - uses : actions/setup-python@v6
43+ persist-credentials : false
44+ - uses : actions/setup-python@v6 # zizmor: ignore[unpinned-uses]
4745 with :
4846 python-version : ' 3.13'
4947 - run : python -m pip install -U --user build
5250 - run : python -m twine check dist/*
5351
5452 test :
55- needs : [core]
56- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
53+ needs : [core, sdist_verify ]
54+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
5755 with :
5856 submodules : false
5957 coverage : codecov
7472
7573 docs :
7674 needs : [core]
77- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
75+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
7876 with :
7977 default_python : ' 3.13'
8078 submodules : false
9593 online :
9694 if : " !startsWith(github.event.ref, 'refs/tags/v')"
9795 needs : [docs]
98- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
96+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
9997 with :
10098 default_python : ' 3.13'
10199 submodules : false
@@ -118,7 +116,7 @@ jobs:
118116 secrets :
119117 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
120118
121- publish :
119+ build_dists :
122120 # Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
123121 # see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
124122 if : |
@@ -128,50 +126,75 @@ jobs:
128126 contains(github.event.pull_request.labels.*.name, 'Run publish')
129127 )
130128 needs : [test, docs]
131- uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v2
129+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v2 # zizmor: ignore[unpinned-uses]
132130 with :
133- upload_to_anaconda : ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
134- anaconda_user : scientific-python-nightly-wheels
135- anaconda_package : sunpy
136- anaconda_keep_n_latest : 1
137- sdist : false
138- test_extras : ' tests'
139- test_command : ' pytest -p no:warnings --doctest-rst --pyargs sunpy'
140- submodules : false
131+ sdist : false # Built with a universal wheel below
141132 targets : |
142133 - cp3{12,13,14}-manylinux*_x86_64
143134 - cp3{12,13,14}-macosx_x86_64
144135 - cp3{12,13,14}-macosx_arm64
145136 - cp3{12,13,14}-win_amd64
146137 - target: cp3{12,13,14}-manylinux_aarch64
147138 runs-on: ubuntu-24.04-arm
139+ test_extras : ' tests'
140+ test_command : ' pytest -p no:warnings --doctest-rst --pyargs sunpy'
141+ submodules : false
142+ save_artifacts : true
143+ upload_to_pypi : false
144+ upload_to_anaconda : ${{ github.event_name == 'workflow_dispatch' }}
145+ anaconda_user : scientific-python-nightly-wheels
146+ anaconda_package : sunpy
147+ anaconda_keep_n_latest : 1
148148 secrets :
149- pypi_token : ${{ secrets.pypi_token }}
150149 anaconda_token : ${{ secrets.anaconda_org_upload_token }}
151150
152151 publish_pure :
153- needs : [publish ]
154- uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2
152+ needs : [test, docs ]
153+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2 # zizmor: ignore[unpinned-uses]
155154 with :
156155 python-version : " 3.13"
157156 test_extras : ' tests'
158157 test_command : ' pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunpy'
159158 submodules : false
160159 env : |
161160 SUNPY_NO_BUILD_ANA_EXTENSION: 1
162- secrets :
163- pypi_token : ${{ secrets.pypi_token }}
161+ save_artifacts : true
162+ upload_to_pypi : false
163+
164+ publish :
165+ if : startsWith(github.ref, 'refs/tags/v')
166+ name : Upload to PyPI
167+ runs-on : ubuntu-latest
168+ needs : [build_dists, publish_pure]
169+ permissions :
170+ id-token : write
171+ environment :
172+ name : pypi
173+ steps :
174+ - name : Download artifacts
175+ uses : actions/download-artifact@v7 # zizmor: ignore[unpinned-uses]
176+ with :
177+ merge-multiple : true
178+ pattern : dist-*
179+ path : dist
180+
181+ - run : ls -lha dist/
182+
183+ - name : Run upload
184+ uses : pypa/gh-action-pypi-publish@v1.13.0 # zizmor: ignore[unpinned-uses]
164185
165186 notify :
166- if : always () && ( github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')
187+ if : ${{ !cancelled () && github.event_name == 'workflow_dispatch' }}
167188 needs : [publish_pure, online]
189+ environment :
190+ name : matrix
168191 runs-on : ubuntu-latest
169192 steps :
170- - uses : Cadair/matrix-notify-action@main
193+ - uses : Cadair/matrix-notify-action@main # zizmor: ignore[unpinned-uses]
171194 with :
172195 matrix_token : ${{ secrets.matrix_access_token }}
173196 github_token : ${{ secrets.GITHUB_TOKEN }}
174197 homeserver : ${{ secrets.matrix_homeserver }}
175198 roomid : ' !JYqfIVJjWANcHnfktY:cadair.com'
176- ignore_pattern : ' .*Load.*'
199+ ignore_pattern : ' .*( Load|report overall) .*'
177200 summarise_success : true
0 commit comments