mirror of
https://github.com/jazzband/django-axes.git
synced 2026-05-14 10:33:11 +00:00
Add release workflow.
This commit is contained in:
parent
f156dd5158
commit
d1fe6f23b7
2 changed files with 53 additions and 41 deletions
53
.github/workflows/release.yml
vendored
Normal file
53
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'jazzband/django-axes'
|
||||
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-axes/upload
|
||||
41
.travis.yml
41
.travis.yml
|
|
@ -1,41 +0,0 @@
|
|||
dist: xenial
|
||||
language: python
|
||||
cache: pip
|
||||
python:
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
- 3.9
|
||||
- pypy3
|
||||
env:
|
||||
- DJANGO=2.2
|
||||
- DJANGO=3.0
|
||||
- DJANGO=3.1
|
||||
- DJANGO=master
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- env: DJANGO=master
|
||||
include:
|
||||
- python: 3.8
|
||||
env: TOXENV=qa
|
||||
- stage: deploy
|
||||
env:
|
||||
python: 3.6
|
||||
script: skip
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: jazzband
|
||||
server: https://jazzband.co/projects/django-axes/upload
|
||||
distributions: sdist bdist_wheel
|
||||
password:
|
||||
secure: TCH5tGIggL2wsWce2svMwpEpPiwVOYqq1R3uSBTexszleP0OafNq/wZk2KZEReR5w1Aq68qp5F5Eeh2ZjJTq4f9M4LtTvqQzrmyNP55DYk/uB1rBJm9b4gBgMtAknxdI2g7unkhQEDo4suuPCVofM7rrDughySNpmvlUQYDttHQ=
|
||||
skip_existing: true
|
||||
on:
|
||||
tags: true
|
||||
repo: jazzband/django-axes
|
||||
python: 3.6
|
||||
install: pip install tox-travis codecov
|
||||
script: tox
|
||||
after_success:
|
||||
- codecov
|
||||
Loading…
Reference in a new issue