🔧 Migrate from Hatch to PDM for the internal build (#11498)

This commit is contained in:
Sebastián Ramírez
2024-04-29 16:48:42 -07:00
committed by GitHub
parent bec2ec7e4c
commit 41fcbc7d00
5 changed files with 60 additions and 21 deletions

View File

@@ -8,6 +8,12 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- fastapi
permissions:
id-token: write
steps:
- name: Dump GitHub context
env:
@@ -21,19 +27,14 @@ jobs:
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- uses: actions/cache@v4
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish
- name: Install build dependencies
run: pip install build
- name: Build distribution
env:
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}