From bed83a999a9d63160064576ed3848b904d1b0afe Mon Sep 17 00:00:00 2001 From: Isak Ruas <38894795+isakruas@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:43:16 -0300 Subject: [PATCH] Create pypi.yml --- .github/workflows/pypi.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pypi.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..9e255fa --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,41 @@ +name: Publish Python Package + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build + + - name: Publish to PyPI + env: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: | + python -m pip install twine + python -m twine upload dist/* + +permissions: + id-token: write + contents: read