Skip to content

Commit

Permalink
fix release script
Browse files Browse the repository at this point in the history
  • Loading branch information
corenting committed Jul 16, 2021
1 parent 7ed735a commit 634cb4b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
branches: [ master ]


jobs:
ci:
strategy:
Expand All @@ -30,11 +31,3 @@ jobs:
- name: Codecov
uses: codecov/codecov-action@v1
if: ${{ matrix.python-version == '3.9' }} # to run only once
- name: Publish on PyPI
if: ${{ startsWith('refs/tags/v', github.ref) && matrix.python-version == '3.9' }}
run: >
poetry config pypi-token.pypi $PYPI_TOKEN
poetry build
poetry publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release
on:
push:
branches: [ master ]
tags:
- '*'
pull_request:
branches: [ master ]


jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
run: pip install poetry
- name: Setup environment
run: poetry install
- name: Style
run: make style
- name: Test
run: make test
- name: Codecov
uses: codecov/codecov-action@v1
- name: Publish on PyPI
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry build
poetry publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 634cb4b

Please sign in to comment.