Skip to content

Commit ad1c234

Browse files
authored
Merge pull request #813 from mikumifa/codex/add-workflow-for-publishing-to-pypi
Add PyPI publish workflow for tagged releases
2 parents 53c6e61 + 4265b75 commit ad1c234

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
publish:
10+
name: Build and publish
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
21+
- name: Install build tools
22+
run: pip install build twine
23+
24+
- name: Build distribution
25+
run: python -m build
26+
27+
- name: Publish to PyPI
28+
uses: pypa/gh-action-pypi-publish@v1
29+
with:
30+
user: __token__
31+
password: ${{ secrets.PYPI_API_TOKEN }}

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ dependencies = [
2525
"tinydb~=4.8.0",
2626
"Pillow~=10.3.0",
2727
]
28+
[project.urls]
29+
Homepage = "https://github.com/mikumifa/biliTickerBuy"
30+
Source = "https://github.com/mikumifa/biliTickerBuy"
31+
2832
[project.scripts]
2933
bilitickerbuy = "main:main"
3034
btb = "main:main"

0 commit comments

Comments
 (0)