From 63830bc27a304c1f5266c2f7af7d46f4aee1c509 Mon Sep 17 00:00:00 2001 From: Gal Ben David Date: Mon, 21 Dec 2020 20:29:14 +0200 Subject: [PATCH] replaced the github actions with a new version --- .github/workflows/build.yml | 23 +++++++++++++++++ .github/workflows/deploy.yml | 23 +++++++++++++++++ .github/workflows/pythonpackage.yml | 38 ----------------------------- 3 files changed, 46 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/pythonpackage.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..ee18514 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build +on: [push, pull_request] + +jobs: + build: + if: github.event_name == 'push' && !startsWith(github.event.ref, 'refs/tags') + runs-on: ubuntu-20.04 + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9, pypy3] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Ubuntu packages + run: >- + sudo apt install libidn2-dev; + - name: Test + run: >- + python setup.py test diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8baba3e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,23 @@ +name: Deploy +on: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Build a source tarball + run: >- + python -m pip install --user --upgrade setuptools; + python setup.py sdist; + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml deleted file mode 100644 index 23df2bd..0000000 --- a/.github/workflows/pythonpackage.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build -on: [push, pull_request] -jobs: - build: - runs-on: ubuntu-20.04 - strategy: - max-parallel: 4 - matrix: - python-version: [3.6, 3.7, 3.8, 3.9, pypy3] - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Test module - run: >- - python setup.py test - deploy: - needs: build - runs-on: ubuntu-20.04 - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Build a source tarball - run: >- - python -m pip install --user --upgrade setuptools; - python setup.py sdist; - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.pypi_password }}