Skip to content

Commit 105bdfb

Browse files
halcyhalcy
authored andcommitted
prepare for pipeline based publication
1 parent 6e60daa commit 105bdfb

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Pipeline to build and publish to pypi on tag starting with v
2+
name: Publish to PyPI on Tag
3+
4+
on:
5+
push:
6+
tags:
7+
- "v*"
8+
9+
permissions:
10+
contents: read
11+
id-token: write
12+
13+
jobs:
14+
build-and-publish:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
cache: "pip"
25+
26+
- name: Install build tools
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install build twine
30+
31+
- name: Build sdist and wheel
32+
run: |
33+
python -m build
34+
twine check dist/*
35+
36+
- name: Publish to PyPI (Trusted Publishing)
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
verbose: true
40+

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
recursive-include tests *
2+
recursive-exclude * __pycache__ *.py[cod]

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ test=pytest
66

77
[tool:pytest]
88
addopts = --cov=blurhash
9+
10+
[metadata]
11+
long_description = file: README.md
12+
long_description_content_type = text/markdown

0 commit comments

Comments
 (0)