From b960763eb6208368b0976fba86db7afc6fe8c1e2 Mon Sep 17 00:00:00 2001 From: Alireza Hosseini Date: Thu, 13 Feb 2025 14:23:49 +0330 Subject: [PATCH] Add publish pipeline --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..82f5c90 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,30 @@ +name: Publish + +on: + release: + types: [created] + + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade setuptools + pip install --upgrade build + pip install --upgrade twine + pip install -r requirements.txt + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python -m build + python -m twine upload dist/*