Skip to content

Commit a2543b9

Browse files
authored
chore: add pypi github action
1 parent c7e1b2d commit a2543b9

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release to PyPI
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
9+
jobs:
10+
build:
11+
name: build dist files
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.9
20+
21+
- name: install build
22+
run: python -m pip install --upgrade build
23+
24+
- name: build dist
25+
run: python -m build
26+
27+
- uses: actions/upload-artifact@v3
28+
with:
29+
name: artifacts
30+
path: dist/*
31+
if-no-files-found: error
32+
33+
publish:
34+
environment:
35+
name: pypi-release
36+
url: https://pypi.org/project/Authlib/
37+
permissions:
38+
id-token: write
39+
name: release to pypi
40+
needs: build
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/download-artifact@v3
45+
with:
46+
name: artifacts
47+
path: dist
48+
49+
- name: Push build artifacts to PyPI
50+
uses: pypa/gh-action-pypi-publish@release/v1
51+
with:
52+
skip-existing: true
53+
repository-url: https://test.pypi.org/legacy/
54+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)