Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thevincentadam committed Sep 15, 2021
1 parent 5805f55 commit afdba19
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 31 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/quality-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,3 @@ jobs:
# ------------ run tests
- name: Run tests
run: poetry run task test
pypi:
needs: check-and-test
if: ${{ github.event.release }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
poetry-version: [1.1.6]
name: Release PyPi package
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
# ------------ install tools
- name: Install building tools
run: |
sudo apt-get install build-essential
sudo apt-get install cmake g++-7
# ------------ build and install package
- name: Install package
run: poetry install
38 changes: 34 additions & 4 deletions .github/workflows/upload-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,45 @@ on:
tags:
- "v*.*.*"


jobs:
upload-pypi:
check-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
poetry-version: [1.1.6]
name: Python-${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# ------------ Install poetry
- name: Setup pip/poetry
run: |
pip install -U pip poetry twine
poetry config virtualenvs.create false
# ------------ install tools
- name: Install building tools
run: |
sudo apt-get install build-essential
sudo apt-get install cmake g++-7
# ------------ build and install package
- name: Install package
run: poetry install
# ------------ run tests
- name: Run tests
run: poetry run task test
pypi:
needs: check-and-test
if: ${{ github.event.release }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
poetry-version: [1.1.6]
name: Release PyPi package
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -45,8 +76,8 @@ jobs:
# ------------ build and install package
- name: Install package
run: |
poetry install
poetry build
poetry install
poetry build
# ------------ check version matches tag
- name: Verify git tag vs. VERSION
run: |
Expand All @@ -62,4 +93,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit afdba19

Please sign in to comment.