-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (38 loc) · 1.22 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
on: [push, pull_request]
name: Build
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 17
- uses: subosito/flutter-action@v1
- run: |
./dev.sh
cd ./unifiedpush_platform_interface
flutter pub get
cd ../unifiedpush
flutter pub get
cd ../unifiedpush_android
flutter pub get
cd ../example
flutter build apk
- uses: actions/upload-artifact@v2
with:
name: example
path: ./example/build/app/outputs/flutter-apk/app-release.apk
- if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p ~/.pub-cache
cat <<EOF > ~/.pub-cache/credentials.json
{
"accessToken":"${{ secrets.PUB_DEV_PUBLISH_ACCESS_TOKEN }}",
"refreshToken":"${{ secrets.PUB_DEV_PUBLISH_REFRESH_TOKEN }}",
"tokenEndpoint":"${{ secrets.PUB_DEV_PUBLISH_TOKEN_ENDPOINT }}",
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ],
"expiration": ${{ secrets.PUB_DEV_PUBLISH_EXPIRATION }}
}
EOF