A .github/workflows/publish.yml => .github/workflows/publish.yml +25 -0
@@ 0,0 1,25 @@
+name: Publish on PyPI
+on:
+ push:
+ tags:
+ - '*'
+jobs:
+ publish:
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install
+ run: scripts/ci/install.sh
+ - name: Test
+ run: scripts/ci/test.sh
+ - name: Lint
+ run: scripts/ci/lint.sh
+ - name: Publish package on PyPI
+ env:
+ PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
+ PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+ run: scripts/ci/publish.sh
A scripts/ci/publish.sh => scripts/ci/publish.sh +7 -0
@@ 0,0 1,7 @@
+#!/usr/bin/env bash
+set -euxo pipefail
+
+source $HOME/.poetry/env
+
+poetry build --format wheel
+poetry publish --username ${PYPI_USERNAME} --password ${PYPI_PASSWORD}