From 9b0f0599a047fcebf99a41b8396d4dbe0f653959 Mon Sep 17 00:00:00 2001 From: michalk8 <46717574+michalk8@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:28:57 +0100 Subject: [PATCH] Add release GitHub action (#1140) --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..213814c8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release +on: + push: + tags: [v*] + +jobs: + release: + runs-on: ubuntu-latest + permissions: + id-token: write + environment: pypi-release + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip build + + - name: Build package + run: | + python -m build --sdist --wheel --outdir dist/ + + - name: Publish PyPI package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true + verify-metadata: true + verbose: true