Skip to content

Commit f1e3f1c

Browse files
committed
Add pyproject.toml, trusted publishing, dependabot
1 parent 69630ea commit f1e3f1c

File tree

4 files changed

+52
-5
lines changed

4 files changed

+52
-5
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/publish.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and publish to PyPI
2+
on: push
3+
jobs:
4+
build:
5+
name: Build distribution
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Set up Python
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: "3"
13+
- name: Install "build"
14+
run: |
15+
python -m pip install build
16+
- name: Build a binary wheel and a source tarball
17+
run: python3 -m build
18+
- name: Store the distribution packages
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: dist
22+
path: dist
23+
publish:
24+
name: Upload release to PyPI
25+
if: startsWith(github.ref, 'refs/tags/')
26+
needs:
27+
- build
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: pypi
31+
url: https://pypi.org/p/pa-ringbuffer
32+
permissions:
33+
id-token: write
34+
steps:
35+
- name: Get the artifacts
36+
uses: actions/download-artifact@v4
37+
with:
38+
name: dist
39+
path: dist
40+
- name: Publish package distributions to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
print-hash: true

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.0"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)