From 69ca67e5fa99002c9de9c8d195298038dd4088cc Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 1 Aug 2020 03:09:23 +0200 Subject: [PATCH] Add Github Actions workflows --- .github/workflows/check.yml | 20 ++++++++++++++++++++ .github/workflows/publish.yml | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 00000000..fdb946a4 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,20 @@ +name: Syntax check + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Install Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Check all .py files + run: python -m compileall royalnet diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..17496f3e --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish to PyPI + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Build and publish the package + uses: abatilo/actions-poetry@v1.5.0 + env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} + with: + python_version: 3.8 + poetry_version: 1.0 + args: publish --build