Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt PEP 517 tooling for builds #379

Merged
merged 2 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ on:
jobs:
build:
if: github.repository == 'jazzband/django-payments'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.10

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install -U setuptools twine wheel build

- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
python -m setuptools_scm
python -m build --sdist --wheel --no-isolation
twine check dist/*

- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]

[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
Expand Down Expand Up @@ -51,3 +54,7 @@ required-imports = ["from __future__ import annotations"]
# This likely needs to be addressed in Django itself (either use an immutable
# type or annotate these fields as ClassVar)
"testapp/testapp/testmain/migrations/0*.py"= ["RUF012"]

[tool.setuptools_scm]
write_to = "payments/version.py"
version_scheme = "post-release"
Loading