Skip to content

Commit c732bfd

Browse files
authored
Merge pull request #7 from Gitsamshi/main
Prepare for PyPI publishing and improve package quality
2 parents eb0d3e0 + 3fd2b8d commit c732bfd

6 files changed

Lines changed: 719 additions & 4 deletions

File tree

‎.github/workflows/publish-pypi.yml‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install build tools
23+
run: pip install build
24+
25+
- name: Build package
26+
run: python -m build
27+
28+
- name: Upload artifacts
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: dist
32+
path: dist/
33+
34+
publish:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
environment: pypi
38+
steps:
39+
- name: Download artifacts
40+
uses: actions/download-artifact@v4
41+
with:
42+
name: dist
43+
path: dist/
44+
45+
- name: Publish to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)