Skip to content

chore: Add package version to the environment URL (#54) #140

chore: Add package version to the environment URL (#54)

chore: Add package version to the environment URL (#54) #140

Workflow file for this run

name: Build and publish
on:
push:
jobs:
build:
name: Build wheel and sdist
runs-on: ubuntu-latest
outputs:
package_version: ${{ steps.baipp.outputs.package_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: hynek/build-and-inspect-python-package@v2
id: baipp
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
id-token: write
environment:
name: pypi
url: https://pypi.org/project/tap-readme/${{ needs.build.outputs.package_version }}
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: svenstaro/upload-release-action@v2
with:
file: dist/*.whl
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- uses: pypa/gh-action-pypi-publish@v1.12.3