Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 33 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
name: Publish

on:
release:
types: [created]
types: [published]

jobs:
build-n-publish:
name: Build and publish
build:
name: Build distribution
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/propelauth_fastapi
run: >-
python -m
pip install -r requirements.txt
--user
- name: Run tests
run: python -m pytest

- name: Build a binary wheel and a source tarball
run: python setup.py sdist
- uses: actions/checkout@v6.0.0
- uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
- run: uv sync --frozen
- run: uv run pytest
- run: uv build
- uses: actions/upload-artifact@v7.0.1
with:
name: python-package-distributions
path: dist/
if-no-files-found: error

- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
publish:
name: Publish to PyPI
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8.0.1
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@v1.14.0
20 changes: 6 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@ jobs:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install
run: >-
python -m
pip install -r requirements.txt
--user

- name: Run tests
run: python -m pytest
- uses: actions/checkout@v6.0.0
- uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
- run: uv sync --frozen
- run: uv run pytest
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
33 changes: 33 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[project]
name = "propelauth-fastapi"
version = "4.3.2"
description = "A FastAPI library for managing authentication, backed by PropelAuth"
readme = "README.md"
requires-python = ">=3.9"
license = { text = "MIT" }
authors = [{ name = "PropelAuth", email = "support@propelauth.com" }]
dependencies = [
"propelauth-py==4.3.2",
"requests",
"httpx>=0.28.1",
"fastapi",
]

[project.urls]
Homepage = "https://github.com/propelauth/propelauth-fastapi"

[dependency-groups]
dev = [
"pytest",
"requests-mock",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv]
no-build = false

[tool.hatch.build.targets.wheel]
packages = ["propelauth_fastapi"]
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

28 changes: 0 additions & 28 deletions setup.py

This file was deleted.

Loading