From a53b4e9d9458e95fcded145cab023b8ace1db262 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Sat, 3 Apr 2021 21:27:16 -0400 Subject: [PATCH] CI: github actions release --- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..e6cf538 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,29 @@ +name: Release +on: + release: + types: + - published +jobs: + release: + name: Create release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - name: Install dependencies + run: | + pip install --upgrade pip + pip install build wheel + - name: Build package + run: python -m build --sdist --wheel --outdir=dist + - name: Deploy package + if: '!github.event.repository.fork' + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.pypi_token }} + packages_dir: dist