Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
Move dist check to Lint.
  • Loading branch information
laymonage committed Jul 6, 2020
1 parent be6de51 commit 0893ec8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 25 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/dist.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,18 @@ jobs:
pip install tox
- name: Lint with isort
run: tox -e isort .

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Check package with twine
run: tox -e dist
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
push:
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build package
run: |
pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 0893ec8

Please sign in to comment.