@@ -20,9 +20,11 @@ concurrency:
2020 group : ${{ github.workflow }}-${{ github.ref }}
2121 cancel-in-progress : true
2222
23+ permissions : {}
24+
2325jobs :
2426 core :
25- 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]
2628 with :
2729 submodules : false
2830 coverage : codecov
3537 sdist_verify :
3638 runs-on : ubuntu-latest
3739 steps :
38- - uses : actions/checkout@v6
39- - uses : actions/setup-python@v6
40+ - uses : actions/checkout@v6 # zizmor: ignore[unpinned-uses]
41+ with :
42+ persist-credentials : false
43+ - uses : actions/setup-python@v6 # zizmor: ignore[unpinned-uses]
4044 with :
4145 python-version : ' 3.13'
4246 - run : python -m pip install -U --user build
4650
4751 test :
4852 needs : [core, sdist_verify]
49- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
53+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
5054 with :
5155 submodules : false
5256 coverage : codecov
6367
6468 docs :
6569 needs : [core]
66- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2
70+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
6771 with :
6872 default_python : ' 3.13'
6973 submodules : false
8791 github.event_name == 'pull_request' &&
8892 contains(github.event.pull_request.labels.*.name, 'Run cron CI')
8993 )
90- uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
94+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v2 # zizmor: ignore[unpinned-uses]
9195 with :
9296 default_python : ' 3.13'
9397 submodules : false
98102 secrets :
99103 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
100104
101- publish :
105+ build_dists :
102106 # Build wheels on PRs only when labelled. Releases will only be published if tagged ^v.*
103107 # see https://github-actions-workflows.openastronomy.org/en/latest/publish.html#upload-to-pypi
104108 if : |
@@ -108,24 +112,50 @@ jobs:
108112 contains(github.event.pull_request.labels.*.name, 'Run publish')
109113 )
110114 needs : [test, docs]
111- uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2
115+ uses : OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v2 # zizmor: ignore[unpinned-uses]
112116 with :
113117 python-version : ' 3.13'
114118 test_extras : ' all,tests'
115119 test_command : ' pytest -p no:warnings --doctest-rst --pyargs ndcube'
116120 submodules : false
117- secrets :
118- pypi_token : ${{ secrets.pypi_token }}
121+ save_artifacts : true
122+ upload_to_pypi : false
123+
124+ publish :
125+ if : startsWith(github.ref, 'refs/tags/v')
126+ name : Upload to PyPI
127+ runs-on : ubuntu-latest
128+ needs : [build_dists]
129+ permissions :
130+ id-token : write
131+ environment :
132+ name : pypi
133+ steps :
134+ - name : Download artifacts
135+ uses : actions/download-artifact@v8 # zizmor: ignore[unpinned-uses]
136+ with :
137+ merge-multiple : true
138+ pattern : dist-*
139+ path : dist
140+
141+ - run : ls -lha dist/
142+
143+ - name : Run upload
144+ uses :
pypa/[email protected] # zizmor: ignore[unpinned-uses] 119145
120146 notify :
121- if : always () && github.event_name == 'workflow_dispatch'
122- needs : [publish , cron]
147+ if : ${{ !cancelled () && ( github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') }}
148+ needs : [build_dists , cron]
123149 runs-on : ubuntu-latest
150+ environment :
151+ name : matrix
124152 steps :
125- - uses : Cadair/matrix-notify-action@main
153+ - uses : Cadair/matrix-notify-action@main # zizmor: ignore[unpinned-uses]
126154 with :
127- matrix_token : ${{ secrets.matrix_access_token }}
155+ workflow_description : " CI Workflow"
156+ matrix_token : ${{ secrets.MATRIX_ACCESS_TOKEN }}
128157 github_token : ${{ secrets.GITHUB_TOKEN }}
129- homeserver : ${{ secrets.matrix_homeserver }}
158+ homeserver : ${{ secrets.MATRIX_HOMESERVER }}
130159 roomid : ' !TWSJXVpyflnZOzmSQz:matrix.org'
131- ignore_pattern : ' .*Load tox.*'
160+ ignore_pattern : ' .*(Load|report overall).*'
161+ summarise_success : true
0 commit comments