diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..e1bf8d4 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,62 @@ +name: Publish build + +on: + push: + # test docs + branches: [ main ] + # only publish on version tags + tags: + - v* + +jobs: + publish: + # This job will run on ubuntu virtual machine + runs-on: ubuntu-latest + steps: + # # Setup Java environment in order to build the Android app. + # - uses: actions/checkout@v1 + # - uses: actions/setup-java@v1 + # with: + # java-version: '12.x' + + # Setup the flutter environment. + - uses: subosito/flutter-action@v1 + + - uses: actions/checkout@v2 + + - name: Cache Flutter dependencies + uses: actions/cache@v1 + with: + path: /opt/hostedtoolcache/flutter + key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }} + + - run: flutter pub get + - run: flutter pub global activate dartdoc + + # Generate docs + - run: dartdoc + + # Upload docs to S3 + - name: S3 Upload + uses: ItsKarma/aws-cli@v1.70.0 + with: + args: s3 cp doc/api s3://livekit-docs/client-sdk-flutter --recursive + env: + AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }} + AWS_DEFAULT_REGION: "us-east-1" + + # - name: Setup credentials + # run: | + # mkdir -p ~/.pub-cache + # cat < ~/.pub-cache/credentials.json + # { + # "accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}", + # "refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}", + # "tokenEndpoint":"https://accounts.google.com/o/oauth2/token", + # "scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ], + # "expiration": 1628106170263 + # } + # EOF + + # - run: flutter pub publish -f diff --git a/dartdoc_options.yaml b/dartdoc_options.yaml new file mode 100644 index 0000000..853baec --- /dev/null +++ b/dartdoc_options.yaml @@ -0,0 +1,12 @@ +dartdoc: + categories: + "Room": + name: Room + "Participant": + name: Participant + "Track": + name: Track + categoryOrder: ["Room", "Participant", "Track"] + linkToSource: + root: lib/src/ + uriTemplate: https://github.com/livekit/client-sdk-flutter/blob/main/lib/src/%f% diff --git a/lib/src/options.dart b/lib/src/options.dart new file mode 100644 index 0000000..ef80ccc --- /dev/null +++ b/lib/src/options.dart @@ -0,0 +1,7 @@ +/// Options when joining a room. +/// {@category Room} +class JoinOptions { + final bool? autoSubscribe; + + const JoinOptions({this.autoSubscribe}); +}