Skip to content

Commit

Permalink
Add pyproject.toml, trusted publishing, dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Sep 28, 2024
1 parent 69630ea commit f1e3f1c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and publish to PyPI
on: push
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install "build"
run: |
python -m pip install build
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
publish:
name: Upload release to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pa-ringbuffer
permissions:
id-token: write
steps:
- name: Get the artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

0 comments on commit f1e3f1c

Please sign in to comment.