Merge pull request #8 from DPIRD-DMA/perf/area-preservation-newton #4
Workflow file for this run
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 to PyPI | |
| # Triggered by pushing a tag that looks like a version, e.g. `v1.0.0`. | |
| # The version comes from the git tag itself (via setuptools-scm) — no file to bump. | |
| # Publishing uses PyPI trusted publishing (OIDC) — no API tokens, no secrets. | |
| # To enable: at https://pypi.org/manage/project/smoothify/settings/publishing/ | |
| # add a publisher with: | |
| # Owner DPIRD-DMA | |
| # Repository name Smoothify | |
| # Workflow name publish.yml | |
| # Environment pypi | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+*" | |
| jobs: | |
| build: | |
| name: Build distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # full history so setuptools-scm can read tags | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - uses: astral-sh/setup-uv@v8.0.0 | |
| - name: Build sdist + wheel | |
| run: uv build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| publish-to-pypi: | |
| name: Publish to PyPI | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/smoothify | |
| permissions: | |
| id-token: write # required for trusted publishing | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| github-release: | |
| name: Create GitHub Release | |
| needs: publish-to-pypi | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # required to create releases | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: python-package-distributions | |
| path: dist/ | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| generate_release_notes: true |