Move releases to GitHub actions.

This commit is contained in:
Jannis Leidel
2020-11-23 11:14:34 +01:00
committed by Claude Paroz
parent 3dc62685f8
commit dc1729fc6f
5 changed files with 62 additions and 26 deletions
+56
View File
@@ -0,0 +1,56 @@
name: Release
on:
push:
branches:
- master
release:
types:
- published
jobs:
build:
if: github.repository == 'jazzband/tablib'
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.action == 'published'
uses: pypa/gh-action-pypi-publish@master
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
repository_url: https://jazzband.co/projects/tablib/upload
-19
View File
@@ -1,19 +0,0 @@
language: python
cache: pip
python: 3.7
install: travis_retry pip install tox-travis
script: tox
deploy:
provider: pypi
user: jazzband
server: https://jazzband.co/projects/tablib/upload
distributions: sdist bdist_wheel
password:
secure: svV4fYtodwW+iTyFOm5ISEfhVwcA+6vTskD3x6peznc40TdMV9Ek8nT3Q/NB4lCbXoUw2qR4H6uhLCjesnv/VvVk/qbitCyD8ySlgwOV5n7NzJs8lC8EYaHSjGQjatTwJAokfGVYkPawkI7HXDqtDggLUQBK+Ag8HDW+XBSbQIU=
on:
tags: true
repo: jazzband/tablib
python: 3.7
-1
View File
@@ -4,7 +4,6 @@
[![PyPI version](https://img.shields.io/pypi/v/tablib.svg)](https://pypi.org/project/tablib/) [![PyPI version](https://img.shields.io/pypi/v/tablib.svg)](https://pypi.org/project/tablib/)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/tablib.svg)](https://pypi.org/project/tablib/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/tablib.svg)](https://pypi.org/project/tablib/)
[![PyPI downloads](https://img.shields.io/pypi/dm/tablib.svg)](https://pypistats.org/packages/tablib) [![PyPI downloads](https://img.shields.io/pypi/dm/tablib.svg)](https://pypistats.org/packages/tablib)
[![Travus CI status](https://img.shields.io/travis/jazzband/tablib/master?label=Travis%20CI&logo=travis)](https://travis-ci.org/jazzband/tablib)
[![GitHub Actions status](https://github.com/jazzband/tablib/workflows/Test/badge.svg)](https://github.com/jazzband/tablib/actions) [![GitHub Actions status](https://github.com/jazzband/tablib/workflows/Test/badge.svg)](https://github.com/jazzband/tablib/actions)
[![codecov](https://codecov.io/gh/jazzband/tablib/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/tablib) [![codecov](https://codecov.io/gh/jazzband/tablib/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/tablib)
[![GitHub](https://img.shields.io/github/license/jazzband/tablib.svg)](LICENSE) [![GitHub](https://img.shields.io/github/license/jazzband/tablib.svg)](LICENSE)
+3 -3
View File
@@ -3,9 +3,9 @@
Jazzband guidelines: https://jazzband.co/about/releases Jazzband guidelines: https://jazzband.co/about/releases
* [ ] Get master to the appropriate code release state. * [ ] Get master to the appropriate code release state.
[Travis CI](https://travis-ci.org/jazzband/tablib) [GitHub Actions](https://github.com/jazzband/tablib/actions)
should pass on master. should pass on master.
[![Build Status](https://travis-ci.org/jazzband/tablib.svg?branch=master)](https://travis-ci.org/jazzband/tablib) [![GitHub Actions status](https://github.com/jazzband/tablib/workflows/Test/badge.svg)](https://github.com/jazzband/tablib/actions)
* [ ] Check [HISTORY.md](https://github.com/jazzband/tablib/blob/master/HISTORY.md), * [ ] Check [HISTORY.md](https://github.com/jazzband/tablib/blob/master/HISTORY.md),
update version number and release date update version number and release date
@@ -16,7 +16,7 @@ git tag -a v0.14.0 -m v0.14.0
git push --tags git push --tags
``` ```
* [ ] Once Travis CI has built and uploaded distributions, check files at * [ ] Once GitHub Actions has built and uploaded distributions, check files at
[Jazzband](https://jazzband.co/projects/tablib) and release to [Jazzband](https://jazzband.co/projects/tablib) and release to
[PyPI](https://pypi.org/pypi/tablib) [PyPI](https://pypi.org/pypi/tablib)
+3 -3
View File
@@ -163,16 +163,16 @@ the easiest way to test your changes for potential issues is to simply run the t
Continuous Integration Continuous Integration
---------------------- ----------------------
Every pull request is automatically tested and inspected upon receipt with `Travis CI`_. Every pull request is automatically tested and inspected upon receipt with `GitHub Actions`_.
If you broke the build, you will receive an email accordingly. If you broke the build, you will receive an email accordingly.
Anyone may view the build status and history at any time. Anyone may view the build status and history at any time.
https://travis-ci.org/jazzband/tablib https://github.com/jazzband/tablib/actions
Additional reports will also be included here in the future, including :pep:`8` checks and stress reports for extremely large datasets. Additional reports will also be included here in the future, including :pep:`8` checks and stress reports for extremely large datasets.
.. _`Travis CI`: https://travis-ci.org/ .. _`GitHub Actions`: https://github.com/jazzband/tablib/actions
.. _docs: .. _docs: