diff options
Diffstat (limited to '.github/workflows/cd.yml')
-rw-r--r-- | .github/workflows/cd.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..1dabd41 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,43 @@ +name: CD + +on: + workflow_dispatch: + release: + types: + - published + + +jobs: + dist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Build SDist and wheel + run: pipx run build + + - uses: actions/upload-artifact@v3 + with: + path: dist/* + + - name: Check metadata + run: pipx run twine check dist/* + + + publish: + needs: [dist] + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + environment: + name: pypi + url: https://pypi.org/p/sphinxcontrib-moderncmakedomain + permissions: + id-token: write + + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 |