1616 # Allow manual runs through the web UI
1717 workflow_dispatch :
1818 # Trigger on completion of the scheduled_builds.yml file (only on main)
19- workflow_run :
19+ workflow_run : # zizmor: ignore[dangerous-triggers] # TODO: Fix our cron job hell
2020 workflows : [Scheduled build triggerer]
2121
2222concurrency :
2323 group : ${{ github.workflow }}-${{ github.ref }}
2424 cancel-in-progress : true
2525
26+ permissions : {}
27+
2628jobs :
2729 core :
28- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
30+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
2931 with :
3032 submodules : false
3133 coverage : codecov
@@ -39,11 +41,10 @@ jobs:
3941 sdist_verify :
4042 runs-on : ubuntu-latest
4143 steps :
42- - uses : actions/checkout@v6
44+ - uses : actions/checkout@v6 # zizmor: ignore[unpinned-uses]
4345 with :
44- fetch-tags : true
45- fetch-depth : 0
46- - uses : actions/setup-python@v6
46+ persist-credentials : false
47+ - uses : actions/setup-python@v6 # zizmor: ignore[unpinned-uses]
4748 with :
4849 python-version : ' 3.13'
4950 - run : python -m pip install -U --user build
5253 - run : python -m twine check dist/*
5354
5455 test :
55- needs : [core]
56- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
56+ needs : [core, sdist_verify ]
57+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
5758 with :
5859 submodules : false
5960 coverage : codecov
7475
7576 docs :
7677 needs : [core]
77- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
78+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
7879 with :
7980 default_python : ' 3.13'
8081 submodules : false
9596 online :
9697 if : " !startsWith(github.event.ref, 'refs/tags/v')"
9798 needs : [docs]
98- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
99+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
99100 with :
100101 default_python : ' 3.13'
101102 submodules : false
@@ -118,7 +119,7 @@ jobs:
118119 secrets :
119120 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
120121
121- publish :
122+ build_dists :
122123 # Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
123124 # see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
124125 if : |
@@ -128,46 +129,71 @@ jobs:
128129 contains(github.event.pull_request.labels.*.name, 'Run publish')
129130 )
130131 needs : [test, docs]
131- uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v2
132+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@v2 # zizmor: ignore[unpinned-uses]
132133 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
134+ sdist : true
141135 targets : |
142136 - cp3{12,13,14}-manylinux*_x86_64
143137 - cp3{12,13,14}-macosx_x86_64
144138 - cp3{12,13,14}-macosx_arm64
145139 - cp3{12,13,14}-win_amd64
146140 - target: cp3{12,13,14}-manylinux_aarch64
147141 runs-on: ubuntu-24.04-arm
142+ test_extras : ' tests'
143+ test_command : ' pytest -p no:warnings --doctest-rst --pyargs sunpy'
144+ submodules : false
145+ save_artifacts : true
146+ upload_to_pypi : false
147+ upload_to_anaconda : ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
148+ anaconda_user : scientific-python-nightly-wheels
149+ anaconda_package : sunpy
150+ anaconda_keep_n_latest : 1
148151 secrets :
149- pypi_token : ${{ secrets.pypi_token }}
150152 anaconda_token : ${{ secrets.anaconda_org_upload_token }}
151153
152154 publish_pure :
153155 needs : [publish]
154- uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2
156+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2 # zizmor: ignore[unpinned-uses]
155157 with :
156158 python-version : " 3.13"
157159 test_extras : ' tests'
158160 test_command : ' pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunpy'
159161 submodules : false
160162 env : |
161163 SUNPY_NO_BUILD_ANA_EXTENSION: 1
162- secrets :
163- pypi_token : ${{ secrets.pypi_token }}
164+ save_artifacts : true
165+ upload_to_pypi : false
166+
167+ publish :
168+ if : startsWith(github.ref, 'refs/tags/v')
169+ name : Upload to PyPI
170+ runs-on : ubuntu-latest
171+ needs : [build_dists]
172+ permissions :
173+ id-token : write
174+ environment :
175+ name : pypi
176+ steps :
177+ - name : Download artifacts
178+ uses : actions/download-artifact@v7 # zizmor: ignore[unpinned-uses]
179+ with :
180+ merge-multiple : true
181+ pattern : dist-*
182+ path : dist
183+
184+ - run : ls -lha dist/
185+
186+ - name : Run upload
187+ uses : pypa/gh-action-pypi-publish@v1 # zizmor: ignore[unpinned-uses]
164188
165189 notify :
166190 if : always() && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')
167191 needs : [publish_pure, online]
192+ environment :
193+ name : matrix
168194 runs-on : ubuntu-latest
169195 steps :
170- - uses : Cadair/matrix-notify-action@main
196+ - uses : Cadair/matrix-notify-action@main # zizmor: ignore[unpinned-uses]
171197 with :
172198 matrix_token : ${{ secrets.matrix_access_token }}
173199 github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments