Skip to content

Commit

Permalink
revert python-publish changes from PR 132
Browse files Browse the repository at this point in the history
  • Loading branch information
philvarner committed Feb 4, 2025
1 parent 89a50e1 commit ed0e767
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
name: PR Checks
name: Build Python Package

on:
push:
branches:
- main
pull_request:
branches: ["main"]
branches:
- main
release:
types:
- published

jobs:
test:
build-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12", "3.13"]
environment:
name: pypi
url: https://pypi.org/p/stapi-fastapi
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pip
.venv
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install
run: |
python -m pip install poetry==1.7.1
poetry install --with=dev
- name: Lint
python-version: "3.12"
- name: Install dependencies
run: |
poetry run pre-commit run --all-files
- name: Test
run: poetry run pytest
python -m pip install --upgrade pip
pip install build
pip install .
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')

0 comments on commit ed0e767

Please sign in to comment.