Skip to content

Commit

Permalink
migrate release workflow from travis ci to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xinxiao committed Oct 7, 2021
1 parent 54afd94 commit ce5c812
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 34 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
name: Pylint

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint `ls -R|grep .py$|xargs`
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
run: |
pylint `ls -R src|grep .py$|xargs`
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release to PyPi

on:
release:
types: [published]

jobs:
rollout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

0 comments on commit ce5c812

Please sign in to comment.