UniFFI packages #164
Workflow file for this run
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: UniFFI packages | |
| # Publishes the per-language livekit-uniffi wrapper packages (Swift xcframework → | |
| # livekit/livekit-uniffi-xcframework; Android AAR → Maven Central) when a | |
| # livekit-uniffi release is published. | |
| # | |
| # knope publishes the `livekit-uniffi/v*` GitHub release (and its git tag) | |
| # directly on the release merge — no draft — so this reacts to the published | |
| # release event, which fires only for genuine livekit-uniffi releases (the gate | |
| # is free). workflow_dispatch allows a manual re-run with an explicit tag. | |
| # | |
| # The Dart/Flutter cdylib target is experimental and not published for now; add a | |
| # `cdylib` job (uniffi-cdylib.yml) back when it ships. | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: "Release tag (e.g. livekit-uniffi/v0.1.6)" | |
| required: true | |
| type: string | |
| dry_run: | |
| description: "Build artifacts but skip publishing." | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| resolve-tag: | |
| runs-on: ubuntu-latest | |
| # The release event fires for every package's release, so proceed only for | |
| # livekit-uniffi. workflow_dispatch always proceeds (explicit tag). | |
| if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'livekit-uniffi/v') }} | |
| outputs: | |
| tag_name: ${{ steps.get-tag.outputs.tag_name }} | |
| version: ${{ steps.get-tag.outputs.version }} | |
| steps: | |
| - id: get-tag | |
| run: | | |
| TAG="${{ github.event.release.tag_name || inputs.tag_name }}" | |
| echo "tag_name=${TAG}" >> "$GITHUB_OUTPUT" | |
| # Strip the "livekit-uniffi/v" prefix to get the package version (e.g. 0.1.6). | |
| echo "version=${TAG#livekit-uniffi/v}" >> "$GITHUB_OUTPUT" | |
| swift: | |
| needs: resolve-tag | |
| uses: ./.github/workflows/uniffi-swift.yml | |
| with: | |
| version: ${{ needs.resolve-tag.outputs.version }} | |
| tag_name: ${{ needs.resolve-tag.outputs.tag_name }} | |
| dry_run: ${{ inputs.dry_run || false }} | |
| secrets: | |
| UNIFFI_XCFRAMEWORK_PAT: ${{ secrets.UNIFFI_XCFRAMEWORK_PAT }} | |
| android: | |
| needs: resolve-tag | |
| uses: ./.github/workflows/uniffi-android.yml | |
| with: | |
| version: ${{ needs.resolve-tag.outputs.version }} | |
| tag_name: ${{ needs.resolve-tag.outputs.tag_name }} | |
| dry_run: ${{ inputs.dry_run || false }} | |
| secrets: inherit |