Add release workflow.

This commit is contained in:
Jannis Leidel 2020-11-26 17:58:11 +01:00
parent f20cddc31f
commit 009f770a31
No known key found for this signature in database
GPG key ID: C795956FB489DCA9
2 changed files with 53 additions and 21 deletions

53
.github/workflows/release.yml vendored Normal file
View file

@ -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

View file

@ -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