From c055ee8d2c3f237036323479955a8ac737487573 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Thu, 26 Nov 2020 18:07:46 +0100 Subject: [PATCH] More GitHub Actions fixes. (#138) * Update some old URLs. * Add release workflow. --- .github/workflows/release.yml | 53 +++++++++++++++++++++++++++++++ .gitignore | 1 + .travis.yml | 21 ------------ README.rst | 12 +++---- django_celery_monitor/__init__.py | 2 +- docs/conf.py | 2 +- 6 files changed, 62 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a2674c3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,53 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + if: github.repository == 'jazzband/django-celery-monitor' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: release-${{ hashFiles('**/setup.py') }} + restore-keys: | + release- + + - name: Install dependencies + run: | + python -m pip install -U pip + python -m pip install -U setuptools twine wheel + + - name: Build package + run: | + python setup.py --version + python setup.py sdist --format=gztar bdist_wheel + 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 + with: + user: jazzband + password: ${{ secrets.JAZZBAND_RELEASE_KEY }} + repository_url: https://jazzband.co/projects/django-celery-monitor/upload diff --git a/.gitignore b/.gitignore index 0ec4d19..7554743 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ cover/ .cache/ htmlcov/ coverage.xml +.tox/ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d8ae0a0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: python -sudo: false -python: -- '2.7' -- '3.4' -- '3.5' -- '3.6' -install: travis_retry pip install -U codecov tox-travis -script: tox -v --travis-after -- -v -after_success: -- codecov -deploy: - provider: pypi - user: jezdez - password: - secure: IyvYrWsNRfmKH5Ib8B6M/F/+EFadWG1z3qs0l5nFAYAx5LqZuL0esLPMLOxgigfN5Ii8Ne1FnJ3KDV8B/i8V6ApBJgiE+0yeP/ExQZ/WQ2ug/CcvxgIFhRN79WzwpWTqRvuYRlxGnA1cp+VLFAweC4dqzXLIzMFQw9uN8h/1uOszc9VsW4asq7/pMFutB0hYMjjZV2RrEARuCVsw93hROB/beGTAmfUOURoVv7zZ1HkcU6fUHDOU10ip7kNxNPVfXk7Z/HOyMti9Hgg6ZGTd7afCN1XBCPj+9nHbOghiEQ8RlaqN9EnoaUfC6H540QuIZISO8aEHxQqzpx8yWNScf/8ZZq3LsBCL6EtzuRWg9HdbZ7DkdezTUHXt8Rnk5ehF8H/bv43ZawTxXxBLTOsH9+ffj98BtpWWAdwEarRLTe61unw62AL7FmCzrfK1amsP74TdlZqTpJTq3Lgb3n31BxC4y4ONhjvlSKxX/z5PO/S9fb94R1v1kAMGeJcB6xtoxNjvfOov3KuRrWdDW+DL8k5tatJSBVyMJMHaOoLFxgmxZG71QZjX6v9UUKXjXD2nwTq9Z8A1aAjQibPMQXRqNErg9uax5h9B1ugWsjp+zeiYYlsQyCCib4h17beVgxVuEiwaDhN0nuaRJKVWWWoDNgwsNF8v5uJTyZNDCk7wFK0= - on: - tags: true - repo: jezdez/django-celery-monitor - python: 3.5 - distributions: sdist bdist_wheel diff --git a/README.rst b/README.rst index f9e5239..a54d8a1 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ Celery Monitoring for Django :Version: 1.1.2 :Web: https://django-celery-monitor.readthedocs.io/ :Download: https://pypi.python.org/pypi/django_celery_monitor -:Source: https://github.com/jezdez/django-celery-monitor +:Source: https://github.com/jazzband/django-celery-monitor :Keywords: django, celery, events, monitoring |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| @@ -125,12 +125,12 @@ In your Celery configuration simply set them to override the defaults, e.g.:: monitor_task_success_expires = timedelta(days=7) -.. |build-status| image:: https://secure.travis-ci.org/jezdez/django-celery-monitor.svg?branch=master - :alt: Build status - :target: https://travis-ci.org/jezdez/django-celery-monitor +.. |build-status| image:: https://github.com/jazzband/django-celery-monitor/workflows/Test/badge.svg + :target: https://github.com/jazzband/django-celery-monitor/actions + :alt: GitHub Actions -.. |coverage| image:: https://codecov.io/github/jezdez/django-celery-monitor/coverage.svg?branch=master - :target: https://codecov.io/github/jezdez/django-celery-monitor?branch=master +.. |coverage| image:: https://codecov.io/github/jazzband/django-celery-monitor/coverage.svg?branch=master + :target: https://codecov.io/github/jazzband/django-celery-monitor?branch=master .. |license| image:: https://img.shields.io/pypi/l/django-celery-monitor.svg :alt: BSD License diff --git a/django_celery_monitor/__init__.py b/django_celery_monitor/__init__.py index e2143f6..a5ae199 100644 --- a/django_celery_monitor/__init__.py +++ b/django_celery_monitor/__init__.py @@ -13,7 +13,7 @@ from collections import namedtuple __version__ = '1.1.2' __author__ = 'Jannis Leidel' __contact__ = 'jannis@leidel.info' -__homepage__ = 'https://github.com/jezdez/django-celery-monitor' +__homepage__ = 'https://github.com/jazzband/django-celery-monitor' __docformat__ = 'restructuredtext' # -eof meta- diff --git a/docs/conf.py b/docs/conf.py index 2d6d4c3..8a34779 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,7 +12,7 @@ globals().update(conf.build_config( version_stable='1.1.2', canonical_url='http://django-celery-monitor.readthedocs.io', webdomain='', - github_project='jezdez/django-celery-monitor', + github_project='jazzband/django-celery-monitor', copyright='2009-2017', django_settings='proj.settings', include_intersphinx={'python', 'sphinx', 'django', 'celery'},