From 4c61d993c84214dca93434559b05c32523a64db7 Mon Sep 17 00:00:00 2001 From: Joshua Date: Fri, 11 Aug 2023 10:13:05 -0500 Subject: [PATCH] Add release automation --- .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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..d3115a6 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,34 @@ +name: Release Package + +on: [workflow_dispatch] + +permissions: + contents: read + +jobs: + build_package: + name: Build Package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build sdist and wheel + run: pipx run build --sdist --wheel + - uses: actions/upload-artifact@v3 + with: + path: dist + + pypi-publish: + needs: [build_package] + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + permissions: + id-token: write + steps: + - uses: actions/download-artifact@v3 + with: + name: artifact + path: dist + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1