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