Skip to content

Commit 47e7cd0

Browse files
committed
👷 Add GitHub Actions for publishing to PyPI
1 parent bbb64e3 commit 47e7cd0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
package:
14+
- fastapi-cli-slim
15+
- fastapi-cli
16+
permissions:
17+
id-token: write
18+
steps:
19+
- name: Dump GitHub context
20+
env:
21+
GITHUB_CONTEXT: ${{ toJson(github) }}
22+
run: echo "$GITHUB_CONTEXT"
23+
- uses: actions/checkout@v4
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
# Issue ref: https://github.com/actions/setup-python/issues/436
29+
# cache: "pip"
30+
# cache-dependency-path: pyproject.toml
31+
- name: Install build dependencies
32+
run: pip install build
33+
- name: Build distribution
34+
env:
35+
TIANGOLO_BUILD_PACKAGE: ${{ matrix.package }}
36+
run: python -m build
37+
- name: Publish
38+
uses: pypa/[email protected]

0 commit comments

Comments
 (0)