|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
15 |
| -name: Publish build |
| 15 | +name: Publish to pub.dev |
16 | 16 |
|
17 | 17 | on:
|
18 |
| - release: |
19 |
| - types: [published] |
| 18 | + push: |
| 19 | + tags: |
| 20 | + - 'v[0-9]+.[0-9]+.[0-9]+*' |
20 | 21 |
|
21 | 22 | jobs:
|
22 | 23 | publish:
|
23 |
| - runs-on: ubuntu-latest |
24 |
| - steps: |
25 |
| - - uses: actions/checkout@v2 |
26 |
| - - name: Install Flutter |
27 |
| - uses: subosito/flutter-action@v2 |
28 |
| - with: |
29 |
| - channel: 'stable' |
30 |
| - - name: Install project dependencies |
31 |
| - run: flutter pub get |
32 |
| - - name: Dart Format Check |
33 |
| - run: dart format lib/ test/ --set-exit-if-changed |
34 |
| - - name: Import Sorter Check |
35 |
| - run: dart run import_sorter:main --no-comments --exit-if-changed |
36 |
| - - name: Dart Analyze Check |
37 |
| - run: flutter analyze |
38 |
| - - name: Dart Test Check |
39 |
| - run: flutter test |
40 |
| - - name: Check version consistency |
41 |
| - run: dart run scripts/check_version.dart |
42 |
| - #- name: Check Publish Warnings |
43 |
| - # run: dart pub publish --dry-run |
44 |
| - - name: Publish |
45 |
| - |
46 |
| - with: |
47 |
| - credentialJson: ${{ secrets.CREDENTIAL_JSON }} |
48 |
| - flutter: true |
49 |
| - skipTests: true |
50 |
| - force: true |
51 |
| - - run: dart pub global activate dartdoc |
52 |
| - |
53 |
| - # Generate docs |
54 |
| - - run: dart doc . |
55 |
| - |
56 |
| - # Upload docs to S3 |
57 |
| - - name: S3 Upload |
58 |
| - run: aws s3 cp doc/api s3://livekit-docs/client-sdk-flutter --recursive |
59 |
| - env: |
60 |
| - AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_AWS_ACCESS_KEY }} |
61 |
| - AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_AWS_API_SECRET }} |
62 |
| - AWS_DEFAULT_REGION: "us-east-1" |
63 |
| - |
| 24 | + permissions: |
| 25 | + id-token: write # Required for authentication using OIDC |
| 26 | + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 |
| 27 | + # with: |
| 28 | + # working-directory: path/to/package/within/repository |
0 commit comments