Publish SMACT distributions to PyPI #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish SMACT distributions to PyPI | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| uses: ./.github/workflows/ci.yml | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Build | |
| run: uv build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| path: dist/*.* | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # For pypi trusted publishing | |
| id-token: write | |
| steps: | |
| - name: Get build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact | |
| path: dist | |
| - name: Publish to PyPi | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true | |
| verbose: true |