From 40c3ab8026b30c1ced5bc62e69194319e31d4c8c Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 20 May 2020 01:04:56 +0200 Subject: [PATCH] Setup release workflow --- .github/workflows/release.yml | 20 ++++++++++++++++++++ .github/workflows/tests.yml | 16 ++++++++-------- .gitignore | 1 + README.md | 1 + 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b852ad0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ +name: Release + +on: + release: + types: [published] + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.8' + - run: pip install poetry==1.0.5 + - run: pip install nox==2019.11.9 + - run: nox + - run: poetry build + - run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 412eb92..06c6944 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,15 +8,15 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8] + python-version: ['3.7', '3.8'] name: Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - run: pip install poetry==1.0.5 - - run: pip install nox==2019.11.9 - - run: nox + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - run: pip install poetry==1.0.5 + - run: pip install nox==2019.11.9 + - run: nox diff --git a/.gitignore b/.gitignore index 28c7812..9af461a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ /.nox/ /.python-version /.venv/ +/dist/ /poetry.lock __pycache__/ diff --git a/README.md b/README.md index 2b619b7..57acdaf 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,4 @@ Biip interprets the data in barcodes. [![Tests](https://github.com/jodal/biip/workflows/Tests/badge.svg)](https://github.com/jodal/biip/actions?workflow=Tests) +[![PyPI](https://img.shields.io/pypi/v/biip.svg)](https://pypi.org/project/biip/)