Skip to content

packaging: Bump hatch-vcs to 0.5.0 #555

packaging: Bump hatch-vcs to 0.5.0

packaging: Bump hatch-vcs to 0.5.0 #555

name: Build and publish
on:
push:
jobs:
build:
name: Build wheel and sdist
runs-on: ubuntu-latest
outputs:
name: ${{ steps.baipp.outputs.package_name }}
version: ${{ steps.baipp.outputs.package_version }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: hynek/build-and-inspect-python-package@c52c3a4710070b50470d903818a7b25115dcd076 # v2.13.0
id: baipp
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
environment:
name: publishing
url: https://pypi.org/p/${{ needs.build.outputs.name }}/${{ needs.build.outputs.version }}
needs: build
permissions:
contents: write
id-token: write
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: Packages
path: dist
- uses: svenstaro/upload-release-action@5e35e583720436a2cc5f9682b6f55657101c1ea1 # 2.11.1
with:
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4