From 90b45459d9308e1c2580d026e740a5e90207ee88 Mon Sep 17 00:00:00 2001 From: Barabazs <31799121+Barabazs@users.noreply.github.com> Date: Wed, 1 Jan 2025 17:45:04 +0100 Subject: [PATCH] feat: add build and release workflow --- .github/workflows/build-and-release.yml | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build-and-release.yml diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml new file mode 100644 index 0000000..e4da6af --- /dev/null +++ b/.github/workflows/build-and-release.yml @@ -0,0 +1,35 @@ +name: Build and release + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Install dependencies + run: | + python -m pip install build + + - name: Build wheels + run: python -m build --wheel + + - name: Release to Github + uses: softprops/action-gh-release@v2 + with: + files: dist/* + + - name: Publish package to PyPi + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}