name: Build TUI on: push: branches: [master] tags: ["v*"] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v4 - name: Build package run: uv build - name: Publish to PyPI if: startsWith(github.ref, 'refs/tags/v') env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} run: uv publish - name: Generate token if: startsWith(github.ref, 'refs/tags/v') id: app-token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} owner: alyraffauf repositories: homebrew-tap - name: Update Homebrew tap if: startsWith(github.ref, 'refs/tags/v') env: GH_TOKEN: ${{ steps.app-token.outputs.token }} run: | VERSION="${GITHUB_REF#refs/tags/v}" gh api repos/alyraffauf/homebrew-tap/dispatches \ -f event_type=atbbs-release \ -f "client_payload[version]=$VERSION"