From 2c8a2c108a865e12889e8814b1a9091624341055 Mon Sep 17 00:00:00 2001 From: Thomas Dowrick Date: Mon, 4 May 2020 11:16:32 +0100 Subject: [PATCH] Issue #74: Copy ci.yml file from surgerycore --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ce9db84 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +on: push + +jobs: + test: + strategy: + matrix: + os: [ubuntu-18.04, macos-latest, windows-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + + - name: Run tox + run: | + tox + + deploy: + runs-on: ubuntu-18.04 + needs: test + steps: + - uses: actions/checkout@v2 + - uses: actions/checkout@master + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: 3.6 + + - name: Install dependencies + run: python -m pip install wheel twine setuptools + + - name: Build wheel + run: | + python setup.py sdist + + - name: Publish package if tagged release + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}