Skip to content

Commit 24f14fd

Browse files
committed
feat: Add GitHub Actions workflow for publishing Python package to PyPI
1 parent ebfe691 commit 24f14fd

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish Python 🐍 distribution to PyPI
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
pypi-publish:
9+
name: Upload release to PyPI
10+
runs-on: ubuntu-latest
11+
environment: pypi
12+
permissions:
13+
# Это разрешение необходимо для получения OIDC токена.
14+
id-token: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.x"
24+
25+
- name: Install build dependencies
26+
run: python -m pip install --upgrade pip build
27+
28+
- name: Build package
29+
run: python -m build
30+
31+
- name: Publish package to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)