From d4a02d647cc74138917a47ff64a06d37cc94991e Mon Sep 17 00:00:00 2001 From: Henrique Date: Wed, 27 Nov 2024 21:45:55 -0300 Subject: [PATCH] Added github workflow --- .github/workflows/release_to_pypi.yaml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/release_to_pypi.yaml diff --git a/.github/workflows/release_to_pypi.yaml b/.github/workflows/release_to_pypi.yaml new file mode 100644 index 0000000..61e591e --- /dev/null +++ b/.github/workflows/release_to_pypi.yaml @@ -0,0 +1,36 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.13' + + - name: Install dependencies + run: | + python -m pip install --upgrade build twine + + - name: Build package + run: | + python -m build + + - name: Check package metadata + run: | + twine check dist/* + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file