diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..85ca943 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,25 @@ +name: "Publish to PyPI" +on: + release: + types: + - published +jobs: + build-n-publish: + name: Build and publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v2 + with: + python-version: '3.7' + architecture: 'x64' + - name: Run build script + run: | + pip install twine --user + pip install wheel + BM_BUILD=1 BM_VERSION=${GITHUB_REF##refs/tags/v} python3 setup.py sdist --format=gztar + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} \ No newline at end of file