Skip to content

Add missing mimimal django version + prepare hotfix release (#475) #8

Add missing mimimal django version + prepare hotfix release (#475)

Add missing mimimal django version + prepare hotfix release (#475) #8

Workflow file for this run

name: Release To PyPI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'django-commons' }}
runs-on: ubuntu-latest
steps:
- name: Noop
run: "true"
determine-tag:
name: Determine the release tag to operate against.
needs: org-check
runs-on: ubuntu-latest
outputs:
release-tag: ${{ steps.determine-tag.outputs.release-tag }}
release-version: ${{ steps.determine-tag.outputs.release-version }}
steps:
- name: Determine Tag
id: determine-tag
run: |
RELEASE_TAG=${GITHUB_REF#refs/tags/}
echo "Release tag: ${RELEASE_TAG}"
if [[ "${RELEASE_TAG}" =~ ^v[0-9]+.[0-9]+.[0-9]+$ ]]; then
echo "release-tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
echo "release-version=${RELEASE_TAG#v}" >> $GITHUB_OUTPUT
else
echo "::error::Release tag '${RELEASE_TAG}' must match 'v\d+.\d+.\d+'."
exit 1
fi
release-django-prometheus-job:
runs-on: ubuntu-latest
name: Release Django-Promethues
needs: determine-tag
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.determine-tag.outputs.release-tag }}
fetch-depth: 0
- 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: Build
run: python -m build
- name: Publish to PyPI
uses: pypa/[email protected]
with:
skip-existing: true
verbose: true
print-hash: true