Use Funda mobile app fingerprint and add open-source rationale #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to PyPI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [pyproject.toml] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Get version | |
| id: version | |
| run: echo "version=$(grep '^version' pyproject.toml | cut -d'"' -f2)" >> $GITHUB_OUTPUT | |
| - name: Check if release exists | |
| id: check | |
| run: | | |
| if gh release view "v${{ steps.version.outputs.version }}" &>/dev/null; then | |
| echo "exists=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "exists=false" >> $GITHUB_OUTPUT | |
| fi | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Build | |
| if: steps.check.outputs.exists == 'false' | |
| run: uv build | |
| - name: Publish to PyPI | |
| if: steps.check.outputs.exists == 'false' | |
| run: uv publish --token ${{ secrets.PYPI_TOKEN }} | |
| - name: Create GitHub Release | |
| if: steps.check.outputs.exists == 'false' | |
| run: gh release create "v${{ steps.version.outputs.version }}" --title "v${{ steps.version.outputs.version }}" --generate-notes | |
| env: | |
| GH_TOKEN: ${{ github.token }} |