Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit fb695aa

Browse files
author
Phil Varner
authored
revert python-publish changes from PR 132 (#138)
1 parent 89a50e1 commit fb695aa

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed
Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
name: PR Checks
1+
name: Build Python Package
22

33
on:
4+
push:
5+
branches:
6+
- main
47
pull_request:
5-
branches: ["main"]
8+
branches:
9+
- main
10+
release:
11+
types:
12+
- published
613

714
jobs:
8-
test:
15+
build-package:
916
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
python-version: ["3.12", "3.13"]
17+
environment:
18+
name: pypi
19+
url: https://pypi.org/p/stapi-fastapi
20+
permissions:
21+
id-token: write
1322
steps:
1423
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
1626
with:
17-
python-version: ${{ matrix.python-version }}
18-
- name: Cache dependencies
19-
uses: actions/cache@v3
20-
with:
21-
path: |
22-
~/.cache/pip
23-
.venv
24-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
25-
restore-keys: |
26-
${{ runner.os }}-pip-${{ matrix.python-version }}-
27-
${{ runner.os }}-pip-
28-
- name: Install
29-
run: |
30-
python -m pip install poetry==1.7.1
31-
poetry install --with=dev
32-
- name: Lint
27+
python-version: "3.12"
28+
- name: Install dependencies
3329
run: |
34-
poetry run pre-commit run --all-files
35-
- name: Test
36-
run: poetry run pytest
30+
python -m pip install --upgrade pip
31+
pip install build
32+
pip install .
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
if: startsWith(github.ref, 'refs/tags')

0 commit comments

Comments
 (0)