docs: update CHANGELOG and CONTRIBUTING for v3.0.1 and hatch-vcs work… #2
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: Release | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build distributions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| # hatch-vcs derives the version from the tags: a shallow clone has | |
| # none, and the build would produce a bogus version. | |
| fetch-depth: 0 | |
| # Do not leave the job token behind in .git/config. | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| # No cache on the release path: a cache entry poisoned by a job on | |
| # another branch would end up inside the artifact we publish. | |
| enable-cache: false | |
| - name: Install the project | |
| run: uv sync --dev | |
| - name: Test before shipping | |
| run: uv run pytest -m 'not integration' | |
| - name: Build | |
| run: uv build | |
| - name: Check metadata | |
| run: uv run twine check dist/* | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: dist | |
| path: dist/ | |
| publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/pyonyphe | |
| permissions: | |
| id-token: write # OIDC token for trusted publishing -- no API token stored | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Publish | |
| uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 | |
| github-release: | |
| name: GitHub release | |
| runs-on: ubuntu-latest | |
| needs: [publish] | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Create the release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "${GITHUB_REF_NAME}" dist/* \ | |
| --title "${GITHUB_REF_NAME}" \ | |
| --notes "See CHANGELOG.md for the details of this release." |