Drop support for Django 5.0 (EOL) (#477) #64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Release | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
pre-release-django-prometheus-job: | |
runs-on: ubuntu-latest | |
name: pre-release django-prometheus | |
if: ${{ github.repository_owner == 'django-commons' }} | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check if version is dev | |
run: | | |
if ! grep -q "dev" django_prometheus/__init__.py; then | |
echo "Version does not contain 'dev', skipping pre-release" | |
exit 1 | |
else | |
echo "Version contains 'dev', proceeding with pre-release" | |
fi | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel setuptools packaging twine build --upgrade | |
- name: Set version number | |
run: python update_version_from_git.py | |
- name: Build | |
run: python -m build | |
- name: Publish to PyPI | |
uses: pypa/[email protected] | |
with: | |
skip-existing: true | |
verbose: true | |
print-hash: true |