-
Notifications
You must be signed in to change notification settings - Fork 3
154 lines (154 loc) · 5.31 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#name: CI
#
#on: [push]
#env:
# flutter_channel: 'stable'
# flutter_version: '1.20.x'
# java_version: '12.x'
#
#jobs:
# # Android Build and Upload
# build-and-test-android:
# name: Android on ${{ matrix.os }}67
63,95# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
# include:
# - os: ubuntu-latest
# flutter_path: /opt/hostedtoolcache/flutter
# - os: macos-latest
# flutter_path: /Users/runner/hostedtoolcache/flutter
# - os: windows-latest
# flutter_path: '%USERPROFILE%\hostedtoolcache\flutter'
#
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-java@v1
# with:
# java-version: ${{ env.java_version }}
# - name: Cache Flutter dependencies
# uses: actions/cache@v1
# with:
# path: ${{ matrix.flutter_path }}
# key: ${{ runner.os }}-flutter-${{ env.flutter_version }}
# - uses: subosito/flutter-action@v1
# with:
# flutter-version: ${{ env.flutter_version }}
# channel: ${{ env.flutter_channel }}
# path: ${{ matrix.flutter_path }}
# - run: flutter pub get
# name: Get dependencies
#
# - run: flutter doctor
# name: Doctor
#
# - run: flutter analyze
# name: Linter
# - run: flutter test --coverage
# name: Tests
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v1
# - run: flutter build appbundle --release --build-number ${{ github.run_id }}
# env:
# GIRAF_KEYSTORE_PASSWORD: ${{ secrets.GIRAF_KEYSTORE_PASSWORD }}
# name: Build appbundle for Play Store
# - name: Upload Artifact
# uses: actions/[email protected]
# with:
# name: Giraf Weekplanner
# path: build/app/outputs/bundle/release
# deploy-to-playstore:
# if: github.ref == 'refs/heads/master'
# needs: build-and-test-android
# name: Upload to Google Play Store
# runs-on: ubuntu-latest
# steps:
# - name: Download artifact
# uses: actions/[email protected]
# with:
# # Artifact name
# name: Giraf Weekplanner
# # Destination path
# path: build/app/outputs/bundle/release
# - name: Create service_account.json
# run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
#
# - name: Publish
# uses: r0adkll/[email protected]
# with:
# serviceAccountJson: service_account.json
# packageName: dk.aau.cs.giraf.weekplanner
# releaseFile: build/app/outputs/bundle/release/app-release.aab
#
# # iOS Build and Upload
# build-and-test-ios:
# name: iOS on macos-latest
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-java@v1
# with:
# java-version: ${{ env.java_version }}
# - uses: subosito/flutter-action@v1
# with:
# flutter-version: ${{ env.flutter_version }}
# channel: ${{ env.flutter_channel }}
# - name: Set XCode 11.4
# run: |
# sudo xcode-select -s /Applications/Xcode_11.4.app/Contents/Developer
# xcodebuild -version
# - uses: Apple-Actions/import-codesign-certs@v1
# with:
# p12-file-base64: ${{ secrets.APPSTORE_P12_BASE64 }}
# p12-password: ${{ secrets.APPSTORE_P12_PASSWORD }}
# - uses: Apple-Actions/download-provisioning-profiles@v1
# with:
# bundle-id: dk.girafsvenner.weekplanner
# issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
# api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
# api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
# - run: flutter pub get
# name: Get dependencies
# - run: flutter analyze
# name: Linter
# - run: flutter test
# name: Tests
# - run: |
# flutter build ios --release --no-codesign --build-number ${{ github.run_id }}
# cd ios
# agvtool new-version ${{ github.run_id }}
# xcodebuild -workspace Runner.xcworkspace \
# -scheme Runner \
# -sdk iphoneos \
# -configuration Release archive \
# -archivePath $PWD/build/Runner.xcarchive
#
# xcodebuild -exportArchive \
# -archivePath $PWD/build/Runner.xcarchive \
# -exportOptionsPlist Runner/ExportOptions.plist \
# -exportPath $PWD/build/ipa
#
# name: Build for iOS
# env:
# FLUTTER_BUILD_NUMBER: ${{ github.run_id }}
# - name: Upload Artifact
# uses: actions/[email protected]
# with:
# name: Giraf Weekplanner iOS
# path: ios/build/ipa
#
# deploy-to-appstore:
# if: github.ref == 'refs/heads/master'
# needs: build-and-test-ios
# name: Upload to Apple AppStore
# runs-on: macos-latest
# steps:
# - name: Download artifact
# uses: actions/[email protected]
# with:
# name: Giraf Weekplanner iOS
# path: ios/build/ipa
# - run: ls -alh ios/build/ipa
# - run: xcrun altool --upload-app --file ios/build/ipa/Runner.ipa --type ios --username "${{ secrets.APPSTORE_USERNAME }}" --password "${{ secrets.APPSTORE_PASSWORD }}"
# name: Upload IPA