Skip to content

Commit

Permalink
add release gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
gulducat committed Apr 20, 2020
1 parent 252134a commit f872c3e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Upload Python Package

on:
release:
types: [created]

jobs:
release:
runs_on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: python -m pip install --upgrade pip twine
- name: Build & Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: make release
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ test:
pytest --cov=basic_api test_basic_api.py
coverage report --show-missing

build:
build: clean
python setup.py sdist bdist_wheel

release:
release: build
twine upload dist/*

clean:
Expand Down

0 comments on commit f872c3e

Please sign in to comment.