From ae41b5eb39314f38bee435765656b89e27b2d352 Mon Sep 17 00:00:00 2001 From: mfhquzit Date: Sat, 20 Dec 2025 12:04:28 +0100 Subject: [PATCH] Add GitHub Actions workflow to publish to PyPI This workflow automates the process of publishing a Python package to PyPI upon tagging a release. --- .github/workflows/Publish to PyPI | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/Publish to PyPI diff --git a/.github/workflows/Publish to PyPI b/.github/workflows/Publish to PyPI new file mode 100644 index 0000000..97d1a0f --- /dev/null +++ b/.github/workflows/Publish to PyPI @@ -0,0 +1,53 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build twine wheel setuptools + + - name: Build distribution + run: | + python -m build + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + twine upload dist/* + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets. GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github. ref }} + body: | + ## Release Notes + + This package is now available on PyPI! + + Install with: + ```bash + pip install tinder-api-wrapper + ``` + draft: false + prerelease: false