From e08f433aadca6a7d5631b98027fbeb0aa16d48e6 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Fri, 14 Jun 2024 20:16:10 +0200 Subject: [PATCH] updated release workflow --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 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 0000000..3fe4953 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: release + +on: + push: + tags: + - 'v*' + +jobs: + publish-release: + name: Publish release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + package + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt + pip install . + + - name: Build release + if: success() && startsWith(github.ref, 'refs/tags') + shell: bash + run: | + python -m pip install --upgrade pip + pip install build twine + python -m build --wheel + + twine check dist/* + twine upload dist/* --skip-existing + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI }}