Debian Codegraph @

.github/workflows/publish.yml

raw
1 name: Release
2
3 on:
4 pull_request:
5 push:
6 branches:
7 - main
8 tags:
9 - "v*"
10 workflow_dispatch:
11
12 permissions: {}
13
14 jobs:
15 build:
16 uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@2835f0cacddf3f8de198db9afdb5354a5cebe0ef # v2
17 with:
18 save_artifacts: true
19 upload_to_pypi: false
20 test_extras: test
21 test_command: pytest --pyargs astropy_sphinx_theme
22
23 upload:
24 if: startsWith(github.ref, 'refs/tags/v')
25 name: Upload release to PyPI
26 runs-on: ubuntu-latest
27 needs: [build]
28 environment: pypi
29 permissions:
30 id-token: write
31 steps:
32 - name: Download artifacts
33 uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
34 with:
35 merge-multiple: true
36 pattern: dist-*
37 path: dist
38
39 - name: Publish to PyPI
40 uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0