Skip to content

Commit 78f5d58

Browse files
ci: fix remove all client dirs
[ci release]
1 parent e71f3b1 commit 78f5d58

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

.github/workflows/default.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
id: flutter_cache
4848
with:
4949
path: ${{ env.PUB_CACHE }}
50-
key: flutter-dependencies-v1-${{hashFiles('client/pubspec.yaml', 'client/pubspec.lock')}}
50+
key: flutter-dependencies-v1-${{hashFiles('pubspec.yaml', 'pubspec.lock')}}
5151
restore-keys: |
5252
flutter-dependencies-v1-
5353
@@ -62,37 +62,33 @@ jobs:
6262
if: ${{ steps.run-tests.outputs.run-tests == 'true' }}
6363
id: dart_tool_cache
6464
with:
65-
path: client/.dart_tool
66-
key: dart-tool-v1-${{hashFiles('client/pubspec.yaml', 'client/build.yaml')}}
65+
path: .dart_tool
66+
key: dart-tool-v1-${{hashFiles('pubspec.yaml', 'build.yaml')}}
6767
restore-keys: |
6868
dart-tool-v1-
6969
7070
- name: Install dependencies
7171
if: ${{ steps.run-tests.outputs.run-tests == 'true' }}
72-
working-directory: client
7372
run: flutter pub get
7473

7574
- name: Run new builder
7675
if: ${{ steps.run-tests.outputs.run-tests == 'true' && steps.dart_tool_cache.outputs.cache-hit != 'true' }}
77-
working-directory: client
7876
run: dart run build_runner build --delete-conflicting-outputs
7977

8078
- name: Run cached builder
8179
if: ${{ steps.run-tests.outputs.run-tests == 'true' && steps.dart_tool_cache.outputs.cache-hit == 'true' }}
82-
working-directory: client
8380
run: dart run build_runner build
8481

8582
- name: Run Tests
8683
if: ${{ steps.run-tests.outputs.run-tests == 'true' }}
87-
working-directory: client
8884
run: flutter test --coverage --machine > test-results.json --dart-define CI=true
8985

9086
- name: Upload test-results.json to artifacts
9187
uses: actions/upload-artifact@v3
9288
if: ${{ failure() || success() }}
9389
with:
9490
name: test-results
95-
path: client/test-results.json
91+
path: test-results.json
9692

9793
release:
9894
permissions:
@@ -119,7 +115,7 @@ jobs:
119115
id: flutter_cache
120116
with:
121117
path: ${{ env.PUB_CACHE }}
122-
key: flutter-dependencies-v1-${{hashFiles('client/pubspec.yaml', 'client/pubspec.lock')}}
118+
key: flutter-dependencies-v1-${{hashFiles('pubspec.yaml', 'pubspec.lock')}}
123119
restore-keys: |
124120
flutter-dependencies-v1-
125121
@@ -133,38 +129,32 @@ jobs:
133129
uses: actions/cache@v3
134130
id: dart_tool_cache
135131
with:
136-
path: client/.dart_tool
137-
key: dart-tool-v1-${{hashFiles('client/pubspec.yaml', 'client/build.yaml')}}
132+
path: .dart_tool
133+
key: dart-tool-v1-${{hashFiles('pubspec.yaml', 'build.yaml')}}
138134
restore-keys: |
139135
dart-tool-v1-
140136
141137
- name: Install dependencies
142-
working-directory: client
143138
run: flutter pub get
144139

145140
- name: Run new builder
146-
working-directory: client
147141
if: ${{ steps.dart_tool_cache.outputs.cache-hit != 'true' }}
148142
run: dart run build_runner build --delete-conflicting-outputs
149143

150144
- name: Run cached builder
151-
working-directory: client
152145
if: ${{ steps.dart_tool_cache.outputs.cache-hit == 'true' }}
153146
run: dart run build_runner build
154147

155148
- name: Build apk
156-
working-directory: client
157149
run: flutter build apk
158150

159151
- name: Get version from pubspec.yaml
160-
working-directory: client
161152
id: version
162153
run: |
163154
version=$(grep 'version:' pubspec.yaml | awk '{print $2}' | awk -F "+" '{print $1}')
164155
echo "version=$version" >> $GITHUB_OUTPUT
165156
166157
- name: Add version to APK filename
167-
working-directory: client
168158
run: |
169159
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/app-release-v${{ steps.version.outputs.version }}.apk
170160

0 commit comments

Comments
 (0)