Skip to content

Commit 8f9e9d7

Browse files
authored
Update publish.yaml (#708)
1 parent 7743e2d commit 8f9e9d7

File tree

1 file changed

+9
-44
lines changed

1 file changed

+9
-44
lines changed

.github/workflows/publish.yaml

+9-44
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: Publish build
15+
name: Publish to pub.dev
1616

1717
on:
18-
release:
19-
types: [published]
18+
push:
19+
tags:
20+
- 'v[0-9]+.[0-9]+.[0-9]+*'
2021

2122
jobs:
2223
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-
uses: k-paxian/[email protected]
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

Comments
 (0)