Skip to content

Commit f13065b

Browse files
committed
chore: build apk and upload to aws
1 parent 17517cf commit f13065b

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

.github/workflows/distribute_external.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,27 @@ jobs:
7474
cache: true
7575
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
7676

77-
- name: Setup Ruby
78-
uses: ruby/setup-ruby@v1
77+
- name: Build
78+
run: flutter build apk
79+
working-directory: sample_app
80+
81+
- name: Upload Artifact
82+
uses: actions/upload-artifact@v4
7983
with:
80-
bundler-cache: true
81-
working-directory: sample_app/android
84+
name: android-stream-chat-v1
85+
path: sample_app/build/app/outputs/apk/release/app-release.apk
8286

83-
- name: Setup Firebase Service Account'
84-
working-directory: sample_app/android
85-
run: echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ./firebase-service-account.json
87+
- name: Configure AWS credentials
88+
uses: aws-actions/configure-aws-credentials@v2
89+
with:
90+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
91+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
92+
aws-region: us-east-1
8693

87-
- name: Distribute to Firebase
88-
working-directory: sample_app/android
89-
run: bundle exec fastlane distribute_to_firebase
94+
- name: Upload to S3
95+
run: |
96+
cp sample_app/build/app/outputs/apk/release/app-release.apk flutter-sample-app.apk
97+
aws s3 cp flutter-sample-app.apk s3://${{ secrets.AWS_S3_BUCKET }} --sse AES256
9098
9199
ios:
92100
needs: determine_platforms

0 commit comments

Comments
 (0)