Skip to content

Commit

Permalink
GitHub Action to release to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Feb 6, 2024
1 parent d47d178 commit 8bb2d04
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
if: github.repository == 'celery/django-celery-beat'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: python -m pip install --upgrade pip
- run: python -m pip install --upgrade build twine
- run: python -m build
- run: twine check dist/*

pypi-publish:
needs: build
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.CELERY_PYPI_TOKEN }}
repository-url: https://pypi.org/p/django-celery-beat

0 comments on commit 8bb2d04

Please sign in to comment.