dj-database-url/.github/workflows/release.yml
Gabriel Barrantes e8fe5666b2 build: switch to pyproject.toml for package building
Use the pyproject.toml configuration instead of setup.py for building
the package. This modernizes the build process, ensures better
compatibility with PEP tools, and simplifies dependency
management.
2025-09-04 15:33:48 -06:00

39 lines
990 B
YAML

name: Release
on:
push:
tags:
- "*"
jobs:
build:
if: github.repository == 'jazzband/dj-database-url'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build twine setuptools wheel
- name: Build package
run: |
python -m build --sdist --wheel --outdir dist
twine check dist/*
- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/dj-database-url/upload