Add UniFFI Kotlin bindings for payjoin-ffi #1131
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: Build and Test Dart | |
| on: | |
| workflow_run: | |
| workflows: ["Flake maintenance"] | |
| types: [requested] | |
| branches: | |
| - "update_flake_lock_action" | |
| pull_request: | |
| paths: | |
| - payjoin-ffi/** | |
| # The jobs run inside the flake's dev shell, so changes to the flake | |
| # change this workflow's environment. | |
| - flake.nix | |
| - flake.lock | |
| push: | |
| tags: | |
| - "payjoin-dart-[0-9]*" | |
| jobs: | |
| build-dart-and-test: | |
| name: "Build and test dart" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-26.04, macos-latest] | |
| env: | |
| RUSTUP_TOOLCHAIN: 1.85.0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: "Install Rust 1.85.0" | |
| uses: dtolnay/rust-toolchain@1.85.0 | |
| - name: "Use cache" | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: msrv-workspace | |
| - name: Set up nix | |
| uses: ./.github/actions/setup-nix | |
| - name: "Build and test" | |
| run: nix develop .#dart -c bash ./payjoin-ffi/dart/contrib/test.sh | |
| verify-pub-package: | |
| name: "Verify pub.dev package" | |
| runs-on: ubuntu-26.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: "Use cache" | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Set up nix | |
| uses: ./.github/actions/setup-nix | |
| - name: Generate production bindings and dry-run publish | |
| run: nix develop .#dart -c ./payjoin-ffi/dart/contrib/prepare-publish.sh | |
| verify-tag: | |
| name: "Verify release tag" | |
| if: startsWith(github.ref, 'refs/tags/payjoin-dart-') | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/verify-tag-hygiene.yml | |
| publish-pub: | |
| name: "Publish to pub.dev (automated publishing / OIDC)" | |
| runs-on: ubuntu-26.04 | |
| needs: [build-dart-and-test, verify-pub-package, verify-tag] | |
| if: startsWith(github.ref, 'refs/tags/payjoin-dart-') | |
| environment: release | |
| permissions: | |
| id-token: write # OIDC: pub.dev automated publishing | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: "Use cache" | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Set up nix | |
| uses: ./.github/actions/setup-nix | |
| - name: Read pubspec version | |
| id: pubspec | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| version="$(sed -n 's/^version: *//p' payjoin-ffi/dart/pubspec.yaml)" | |
| if [ -z "$version" ]; then | |
| echo "::error::could not read version from pubspec.yaml" | |
| exit 1 | |
| fi | |
| echo "version=$version" >>"$GITHUB_OUTPUT" | |
| - name: Verify tag matches pubspec version | |
| uses: ./.github/actions/verify-tag-version | |
| with: | |
| tag-prefix: payjoin-dart- | |
| version: ${{ steps.pubspec.outputs.version }} | |
| - name: Prepare the package | |
| run: nix develop .#dart -c ./payjoin-ffi/dart/contrib/prepare-publish.sh | |
| - name: Publish to pub.dev | |
| run: nix develop .#dart -c ./payjoin-ffi/dart/contrib/publish.sh |