From f5c17e46af052a7816c93d166a0b6145f4c47fc8 Mon Sep 17 00:00:00 2001 From: jspc Date: Wed, 1 Dec 2021 12:23:18 +0000 Subject: [PATCH] Build and publish via github actions --- .github/workflows/main.yaml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..50b7324 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,40 @@ +name: main + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7, 3.8] + steps: + - uses: actions/checkout@v2 + - name: Build on python ${{ matrix.node-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - run: | + pip install nose2 + nose2 + + publish: + if: contains(github.ref, 'refs/tags') + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: configure + run: | + pip install install --upgrade build + VERSION=$GITHUB_REF_NAME python -m build + + - name: publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_TOKEN }}