Skip to content

Commit d50b22e

Browse files
committed
[ci] Added workflow for publishing PyPI package
1 parent 23a66f2 commit d50b22e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pypi.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Python Package to Pypi.org
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write
9+
10+
jobs:
11+
pypi-publish:
12+
name: Release Python Package on Pypi.org
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi
16+
url: https://pypi.org/p/swapper
17+
permissions:
18+
id-token: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.10'
25+
- name: Install dependencies
26+
run: |
27+
pip install -U pip
28+
pip install build
29+
- name: Build package
30+
run: python -m build
31+
- name: Publish package distributions to PyPI
32+
uses: pypa/[email protected]

0 commit comments

Comments
 (0)