project-auto-wizard 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +3 -1
- package/README.ko.md +3 -1
- package/README.md +4 -2
- package/README.zh-CN.md +3 -1
- package/package.json +1 -1
- package/payload/config/breaking-changes.json +31 -5
- package/payload/config/wizard-prompts.yml +0 -4
- package/payload/scripts/changelog_manager.py +8 -8
- package/payload/scripts/messages.py +460 -24
- package/payload/scripts/version_manager.py +102 -73
- package/payload/version.yml.template +2 -2
- package/payload/workflows/common/PROJECT-COMMON-AI-PR-SUMMARY.yaml +9 -4
- package/payload/workflows/common/PROJECT-COMMON-AUTO-CHANGELOG-CONTROL.yaml +62 -30
- package/payload/workflows/common/PROJECT-COMMON-README-VERSION-UPDATE.yaml +96 -44
- package/payload/workflows/common/PROJECT-COMMON-RELEASE-PUBLISH.yaml +79 -35
- package/payload/workflows/common/PROJECT-COMMON-VERSION-CONTROL.yaml +71 -35
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-FIREBASE-CICD.yaml +24 -8
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-PLAYSTORE-CICD.yaml +29 -10
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-SELFHOSTED-CICD.yaml +57 -23
- package/payload/workflows/flutter/PROJECT-FLUTTER-ANDROID-TEST-APK.yaml +155 -72
- package/payload/workflows/flutter/PROJECT-FLUTTER-APP-BUILD-TRIGGER.yaml +49 -20
- package/payload/workflows/flutter/PROJECT-FLUTTER-CI.yaml +162 -62
- package/payload/workflows/flutter/PROJECT-FLUTTER-IOS-TEST-TESTFLIGHT.yaml +184 -87
- package/payload/workflows/flutter/PROJECT-FLUTTER-IOS-TESTFLIGHT.yaml +38 -15
- package/payload/workflows/go/PROJECT-GO-CI.yaml +14 -5
- package/payload/workflows/go/PROJECT-GO-PR-PREVIEW.yaml +375 -120
- package/payload/workflows/go/PROJECT-GO-SIMPLE-CICD.yaml +9 -4
- package/payload/workflows/python/PROJECT-PYTHON-CI.yaml +12 -4
- package/payload/workflows/python/PROJECT-PYTHON-PR-PREVIEW.yaml +375 -120
- package/payload/workflows/python/PROJECT-PYTHON-SIMPLE-CICD.yaml +9 -4
- package/payload/workflows/react/PROJECT-REACT-CI.yaml +38 -9
- package/payload/workflows/react/PROJECT-REACT-CICD.yaml +19 -5
- package/payload/workflows/spring/PROJECT-SPRING-CI.yml +71 -35
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-NONSTOP-NGINX-CICD.yaml +9 -6
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-NONSTOP-TRAEFIK-CICD.yaml +7 -4
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-PR-PREVIEW.yaml +425 -144
- package/payload/workflows/spring/server-deploy/PROJECT-SPRING-SIMPLE-CICD.yaml +7 -4
- package/src/cli/args.js +17 -7
- package/src/commands/doctor.js +16 -0
- package/src/commands/dry-run.js +10 -1
- package/src/commands/full.js +5 -2
- package/src/commands/interactive.js +4 -1
- package/src/commands/status.js +14 -1
- package/src/core/copy/readme.js +58 -2
- package/src/core/copy/simple.js +31 -0
- package/src/core/copy/workflows.js +2 -2
- package/src/core/deploy-style.js +1 -1
- package/src/core/detect.js +3 -2
- package/src/core/types.js +15 -8
- package/src/core/version-yml.js +52 -6
- package/src/i18n/catalog/en/cli.js +1 -0
- package/src/i18n/catalog/en/commands.js +9 -0
- package/src/i18n/catalog/en/copy.js +1 -0
- package/src/i18n/catalog/en/core2.js +3 -0
- package/src/i18n/catalog/ko/cli.js +1 -0
- package/src/i18n/catalog/ko/commands.js +9 -0
- package/src/i18n/catalog/ko/copy.js +1 -0
- package/src/i18n/catalog/ko/core2.js +3 -0
- package/src/index.js +8 -4
- package/src/ui/env-plan.js +1 -1
- package/src/ui/prompts.js +7 -3
- package/src/ui/summary.js +1 -1
- package/payload/workflows/next/PROJECT-NEXT-CI.yaml +0 -241
- package/payload/workflows/next/PROJECT-NEXT-CICD.yaml +0 -330
|
@@ -96,6 +96,7 @@ jobs:
|
|
|
96
96
|
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
|
|
97
97
|
FIREBASE_SERVICE_ACCOUNT_JSON_BASE64: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON_BASE64 }}
|
|
98
98
|
run: |
|
|
99
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
99
100
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
100
101
|
MISSING=""
|
|
101
102
|
for NAME in RELEASE_KEYSTORE_BASE64 RELEASE_KEYSTORE_PASSWORD RELEASE_KEY_ALIAS RELEASE_KEY_PASSWORD FIREBASE_SERVICE_ACCOUNT_JSON_BASE64; do
|
|
@@ -123,14 +124,16 @@ jobs:
|
|
|
123
124
|
env:
|
|
124
125
|
ENV_CONTENT: ${{ secrets.ENV_FILE || secrets.ENV }}
|
|
125
126
|
run: |
|
|
127
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
128
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
126
129
|
if [ "$ENV_MODE" = "dotenv" ]; then
|
|
127
130
|
printf '%s\n' "$ENV_CONTENT" > .env
|
|
128
|
-
|
|
131
|
+
m wf_flutter.dotenv_created
|
|
129
132
|
elif [ -n "$ENV_CONTENT" ]; then
|
|
130
133
|
DART_DEFINE_FILE="$RUNNER_TEMP/dart-define.env"
|
|
131
134
|
printf '%s\n' "$ENV_CONTENT" > "$DART_DEFINE_FILE"
|
|
132
135
|
echo "DART_DEFINE_FILE=$DART_DEFINE_FILE" >> "$GITHUB_ENV"
|
|
133
|
-
|
|
136
|
+
m wf_flutter.dart_define_prepared
|
|
134
137
|
fi
|
|
135
138
|
|
|
136
139
|
- name: Set up Flutter
|
|
@@ -158,6 +161,7 @@ jobs:
|
|
|
158
161
|
id: current_version
|
|
159
162
|
working-directory: ${{ github.workspace }} # version_manager.py must read the repo-root version.yml
|
|
160
163
|
run: |
|
|
164
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
161
165
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
162
166
|
# Get VERSION (x.y.z format)
|
|
163
167
|
VERSION=$(python3 .github/scripts/version_manager.py get | tail -n 1)
|
|
@@ -179,13 +183,14 @@ jobs:
|
|
|
179
183
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
180
184
|
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
|
|
181
185
|
echo "TODAY=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
|
|
182
|
-
echo "TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
|
|
186
|
+
echo "TIMESTAMP=$(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_ENV
|
|
183
187
|
echo "PROJECT_TYPE=${{ env.PROJECT_TYPE }}" >> $GITHUB_ENV
|
|
184
188
|
|
|
185
189
|
- name: Generate release notes
|
|
186
190
|
id: release_notes
|
|
187
191
|
working-directory: ${{ github.workspace }} # CHANGELOG.json, changelog_manager.py and final_release_notes.txt (paired with the upload) are relative to the repo root
|
|
188
192
|
run: |
|
|
193
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
189
194
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
190
195
|
VERSION="${{ steps.current_version.outputs.version }}"
|
|
191
196
|
|
|
@@ -263,14 +268,16 @@ jobs:
|
|
|
263
268
|
env:
|
|
264
269
|
ENV_CONTENT: ${{ secrets.ENV_FILE || secrets.ENV }}
|
|
265
270
|
run: |
|
|
271
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
272
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
266
273
|
if [ "$ENV_MODE" = "dotenv" ]; then
|
|
267
274
|
printf '%s\n' "$ENV_CONTENT" > .env
|
|
268
|
-
|
|
275
|
+
m wf_flutter.dotenv_created
|
|
269
276
|
elif [ -n "$ENV_CONTENT" ]; then
|
|
270
277
|
DART_DEFINE_FILE="$RUNNER_TEMP/dart-define.env"
|
|
271
278
|
printf '%s\n' "$ENV_CONTENT" > "$DART_DEFINE_FILE"
|
|
272
279
|
echo "DART_DEFINE_FILE=$DART_DEFINE_FILE" >> "$GITHUB_ENV"
|
|
273
|
-
|
|
280
|
+
m wf_flutter.dart_define_prepared
|
|
274
281
|
fi
|
|
275
282
|
|
|
276
283
|
- name: Setup Release Keystore
|
|
@@ -280,6 +287,7 @@ jobs:
|
|
|
280
287
|
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
|
|
281
288
|
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
|
|
282
289
|
run: |
|
|
290
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
283
291
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
284
292
|
# An empty keystore built from an empty Secret leaves it unclear which key signed the build, or ends in a misleading error in a later step
|
|
285
293
|
MISSING=""
|
|
@@ -301,6 +309,7 @@ jobs:
|
|
|
301
309
|
|
|
302
310
|
- name: Create key.properties
|
|
303
311
|
run: |
|
|
312
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
304
313
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
305
314
|
cat > android/key.properties << EOF
|
|
306
315
|
storeFile=app/keystore/key.jks
|
|
@@ -315,12 +324,14 @@ jobs:
|
|
|
315
324
|
env:
|
|
316
325
|
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
|
|
317
326
|
run: |
|
|
327
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
328
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
318
329
|
if [ -n "$GOOGLE_SERVICES_JSON" ]; then
|
|
319
330
|
mkdir -p android/app
|
|
320
331
|
printf '%s' "$GOOGLE_SERVICES_JSON" > android/app/google-services.json
|
|
321
|
-
|
|
332
|
+
m wf_flutter.google_services_created
|
|
322
333
|
else
|
|
323
|
-
|
|
334
|
+
m wf_flutter.google_services_skipped
|
|
324
335
|
fi
|
|
325
336
|
|
|
326
337
|
- name: Set up Flutter
|
|
@@ -362,6 +373,7 @@ jobs:
|
|
|
362
373
|
|
|
363
374
|
- name: Configure Android build for release
|
|
364
375
|
run: |
|
|
376
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
365
377
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
366
378
|
# Add the release signing config to build.gradle.kts if it is missing
|
|
367
379
|
if ! grep -q "signingConfigs" android/app/build.gradle.kts; then
|
|
@@ -375,6 +387,7 @@ jobs:
|
|
|
375
387
|
|
|
376
388
|
- name: Build Android App Bundle (AAB)
|
|
377
389
|
run: |
|
|
390
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
378
391
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
379
392
|
VERSION_NAME="${{ needs.prepare-build.outputs.version }}"
|
|
380
393
|
VERSION_CODE="${{ needs.prepare-build.outputs.version_code }}"
|
|
@@ -437,7 +450,7 @@ jobs:
|
|
|
437
450
|
# pubspec.yaml stays in x.y.z format; VERSION_CODE is managed automatically in version.yml
|
|
438
451
|
m flutter_a.running_flutter_build
|
|
439
452
|
m flutter_a.command_flutter_build_appbundle_release version_name="$VERSION_NAME" version_code="$VERSION_CODE"
|
|
440
|
-
m flutter_a.build_start_time cmd1="$(date '+%Y-%m-%d %H:%M:%S')"
|
|
453
|
+
m flutter_a.build_start_time cmd1="$(date -u '+%Y-%m-%d %H:%M:%S UTC')"
|
|
441
454
|
|
|
442
455
|
flutter build appbundle \
|
|
443
456
|
--release \
|
|
@@ -624,6 +637,7 @@ jobs:
|
|
|
624
637
|
env:
|
|
625
638
|
SERVICE_ACCOUNT_BASE64: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON_BASE64 }}
|
|
626
639
|
run: |
|
|
640
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
627
641
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
628
642
|
if [ -z "$SERVICE_ACCOUNT_BASE64" ]; then
|
|
629
643
|
echo "::error::$(m flutter_a.firebase_service_account_json_base64)"
|
|
@@ -658,6 +672,7 @@ jobs:
|
|
|
658
672
|
- name: Notify Firebase Upload Success
|
|
659
673
|
if: success()
|
|
660
674
|
run: |
|
|
675
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
661
676
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
662
677
|
m flutter_a.firebase_app_distribution_deployment_succeeded
|
|
663
678
|
m flutter_a.version version="${{ needs.prepare-build.outputs.version }}" version_code="${{ needs.prepare-build.outputs.version_code }}"
|
|
@@ -671,6 +686,7 @@ jobs:
|
|
|
671
686
|
- name: Notify on Failure
|
|
672
687
|
if: failure()
|
|
673
688
|
run: |
|
|
689
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
674
690
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
675
691
|
m flutter_a.firebase_app_distribution_deployment_failed
|
|
676
692
|
m flutter_a.please_check_logs
|
|
@@ -83,6 +83,7 @@ jobs:
|
|
|
83
83
|
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64 }}
|
|
84
84
|
ANDROID_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME || vars.ANDROID_PACKAGE_NAME }}
|
|
85
85
|
run: |
|
|
86
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
86
87
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
87
88
|
MISSING=""
|
|
88
89
|
for NAME in RELEASE_KEYSTORE_BASE64 RELEASE_KEYSTORE_PASSWORD RELEASE_KEY_ALIAS RELEASE_KEY_PASSWORD GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64; do
|
|
@@ -103,14 +104,16 @@ jobs:
|
|
|
103
104
|
env:
|
|
104
105
|
ENV_CONTENT: ${{ secrets.ENV_FILE || secrets.ENV }}
|
|
105
106
|
run: |
|
|
107
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
108
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
106
109
|
if [ "$ENV_MODE" = "dotenv" ]; then
|
|
107
110
|
printf '%s\n' "$ENV_CONTENT" > .env
|
|
108
|
-
|
|
111
|
+
m wf_flutter.dotenv_created
|
|
109
112
|
elif [ -n "$ENV_CONTENT" ]; then
|
|
110
113
|
DART_DEFINE_FILE="$RUNNER_TEMP/dart-define.env"
|
|
111
114
|
printf '%s\n' "$ENV_CONTENT" > "$DART_DEFINE_FILE"
|
|
112
115
|
echo "DART_DEFINE_FILE=$DART_DEFINE_FILE" >> "$GITHUB_ENV"
|
|
113
|
-
|
|
116
|
+
m wf_flutter.dart_define_prepared
|
|
114
117
|
fi
|
|
115
118
|
|
|
116
119
|
- name: Set up Flutter
|
|
@@ -138,6 +141,7 @@ jobs:
|
|
|
138
141
|
id: current_version
|
|
139
142
|
working-directory: ${{ github.workspace }} # version_manager.py must read the repo-root version.yml
|
|
140
143
|
run: |
|
|
144
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
141
145
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
142
146
|
# Get VERSION (x.y.z format)
|
|
143
147
|
VERSION=$(python3 .github/scripts/version_manager.py get | tail -n 1)
|
|
@@ -159,13 +163,14 @@ jobs:
|
|
|
159
163
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
160
164
|
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
|
|
161
165
|
echo "TODAY=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
|
|
162
|
-
echo "TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
|
|
166
|
+
echo "TIMESTAMP=$(date -u '+%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_ENV
|
|
163
167
|
echo "PROJECT_TYPE=${{ env.PROJECT_TYPE }}" >> $GITHUB_ENV
|
|
164
168
|
|
|
165
169
|
- name: Generate release notes
|
|
166
170
|
id: release_notes
|
|
167
171
|
working-directory: ${{ github.workspace }} # CHANGELOG.json, changelog_manager.py and final_release_notes.txt (paired with the upload) are relative to the repo root
|
|
168
172
|
run: |
|
|
173
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
169
174
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
170
175
|
VERSION="${{ steps.current_version.outputs.version }}"
|
|
171
176
|
|
|
@@ -245,14 +250,16 @@ jobs:
|
|
|
245
250
|
env:
|
|
246
251
|
ENV_CONTENT: ${{ secrets.ENV_FILE || secrets.ENV }}
|
|
247
252
|
run: |
|
|
253
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
254
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
248
255
|
if [ "$ENV_MODE" = "dotenv" ]; then
|
|
249
256
|
printf '%s\n' "$ENV_CONTENT" > .env
|
|
250
|
-
|
|
257
|
+
m wf_flutter.dotenv_created
|
|
251
258
|
elif [ -n "$ENV_CONTENT" ]; then
|
|
252
259
|
DART_DEFINE_FILE="$RUNNER_TEMP/dart-define.env"
|
|
253
260
|
printf '%s\n' "$ENV_CONTENT" > "$DART_DEFINE_FILE"
|
|
254
261
|
echo "DART_DEFINE_FILE=$DART_DEFINE_FILE" >> "$GITHUB_ENV"
|
|
255
|
-
|
|
262
|
+
m wf_flutter.dart_define_prepared
|
|
256
263
|
fi
|
|
257
264
|
|
|
258
265
|
- name: Setup Release Keystore
|
|
@@ -262,6 +269,7 @@ jobs:
|
|
|
262
269
|
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }}
|
|
263
270
|
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
|
|
264
271
|
run: |
|
|
272
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
265
273
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
266
274
|
# An empty keystore built from an empty Secret leaves it unclear which key signed the build, or ends in a misleading error in a later step
|
|
267
275
|
MISSING=""
|
|
@@ -283,6 +291,7 @@ jobs:
|
|
|
283
291
|
|
|
284
292
|
- name: Create key.properties
|
|
285
293
|
run: |
|
|
294
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
286
295
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
287
296
|
cat > android/key.properties << EOF
|
|
288
297
|
storeFile=app/keystore/key.jks
|
|
@@ -297,12 +306,14 @@ jobs:
|
|
|
297
306
|
env:
|
|
298
307
|
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
|
|
299
308
|
run: |
|
|
309
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
310
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
300
311
|
if [ -n "$GOOGLE_SERVICES_JSON" ]; then
|
|
301
312
|
mkdir -p android/app
|
|
302
313
|
printf '%s' "$GOOGLE_SERVICES_JSON" > android/app/google-services.json
|
|
303
|
-
|
|
314
|
+
m wf_flutter.google_services_created
|
|
304
315
|
else
|
|
305
|
-
|
|
316
|
+
m wf_flutter.google_services_skipped
|
|
306
317
|
fi
|
|
307
318
|
|
|
308
319
|
- name: Set up Flutter
|
|
@@ -344,6 +355,7 @@ jobs:
|
|
|
344
355
|
|
|
345
356
|
- name: Configure Android build for release
|
|
346
357
|
run: |
|
|
358
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
347
359
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
348
360
|
# Add the release signing config to build.gradle.kts if it is missing
|
|
349
361
|
if ! grep -q "signingConfigs" android/app/build.gradle.kts; then
|
|
@@ -357,6 +369,7 @@ jobs:
|
|
|
357
369
|
|
|
358
370
|
- name: Build Android App Bundle (AAB)
|
|
359
371
|
run: |
|
|
372
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
360
373
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
361
374
|
VERSION_NAME="${{ needs.prepare-build.outputs.version }}"
|
|
362
375
|
VERSION_CODE="${{ needs.prepare-build.outputs.version_code }}"
|
|
@@ -419,7 +432,7 @@ jobs:
|
|
|
419
432
|
# pubspec.yaml stays in x.y.z format; VERSION_CODE is managed automatically in version.yml
|
|
420
433
|
m flutter_a.running_flutter_build
|
|
421
434
|
m flutter_a.command_flutter_build_appbundle_release version_name="$VERSION_NAME" version_code="$VERSION_CODE"
|
|
422
|
-
m flutter_a.build_start_time cmd1="$(date '+%Y-%m-%d %H:%M:%S')"
|
|
435
|
+
m flutter_a.build_start_time cmd1="$(date -u '+%Y-%m-%d %H:%M:%S UTC')"
|
|
423
436
|
|
|
424
437
|
flutter build appbundle \
|
|
425
438
|
--release \
|
|
@@ -598,6 +611,7 @@ jobs:
|
|
|
598
611
|
env:
|
|
599
612
|
SERVICE_ACCOUNT_BASE64: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON_BASE64 }}
|
|
600
613
|
run: |
|
|
614
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
601
615
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
602
616
|
if [ -z "$SERVICE_ACCOUNT_BASE64" ]; then
|
|
603
617
|
echo "::error::$(m flutter_a.google_play_service_account_json)"
|
|
@@ -627,6 +641,7 @@ jobs:
|
|
|
627
641
|
- name: Install Fastlane
|
|
628
642
|
working-directory: ${{ env.FLUTTER_PROJECT_DIR }}/android
|
|
629
643
|
run: |
|
|
644
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
630
645
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
631
646
|
# If the repository Gemfile has fastlane, use it as is (committing Gemfile.lock is recommended). Otherwise create one.
|
|
632
647
|
if [ -f Gemfile ] && grep -Eq "['\"]fastlane['\"]" Gemfile; then
|
|
@@ -643,6 +658,7 @@ jobs:
|
|
|
643
658
|
# Use android/fastlane/Fastfile.playstore to stay consistent
|
|
644
659
|
- name: Copy Fastfile for Play Store
|
|
645
660
|
run: |
|
|
661
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
646
662
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
647
663
|
mkdir -p android/fastlane
|
|
648
664
|
cp android/fastlane/Fastfile.playstore android/fastlane/Fastfile
|
|
@@ -655,12 +671,13 @@ jobs:
|
|
|
655
671
|
DEPLOY_MODE: ${{ env.DEPLOY_MODE }}
|
|
656
672
|
PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME || vars.ANDROID_PACKAGE_NAME }}
|
|
657
673
|
run: |
|
|
674
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
658
675
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
659
676
|
echo "=========================================="
|
|
660
677
|
m flutter_a.starting_play_store_deployment
|
|
661
678
|
echo "=========================================="
|
|
662
|
-
m flutter_a.deploy_start_time cmd1="$(date '+%Y-%m-%d %H:%M:%S')"
|
|
663
|
-
|
|
679
|
+
m flutter_a.deploy_start_time cmd1="$(date -u '+%Y-%m-%d %H:%M:%S UTC')"
|
|
680
|
+
m wf_flutter.run_number number="${{ github.run_number }}"
|
|
664
681
|
echo "🔍 GitHub SHA: ${{ github.sha }}"
|
|
665
682
|
|
|
666
683
|
# Initialize and validate environment variables
|
|
@@ -768,6 +785,7 @@ jobs:
|
|
|
768
785
|
- name: Notify Play Store Upload Success
|
|
769
786
|
if: success()
|
|
770
787
|
run: |
|
|
788
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
771
789
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
772
790
|
m flutter_a.play_store_internal_testing_deployment
|
|
773
791
|
m flutter_a.version version="${{ needs.prepare-build.outputs.version }}" version_code="${{ needs.prepare-build.outputs.version_code }}"
|
|
@@ -781,6 +799,7 @@ jobs:
|
|
|
781
799
|
- name: Notify on Failure
|
|
782
800
|
if: failure()
|
|
783
801
|
run: |
|
|
802
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
784
803
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
785
804
|
m flutter_a.play_store_deployment_failed
|
|
786
805
|
m flutter_a.please_check_logs
|
|
@@ -62,6 +62,7 @@ jobs:
|
|
|
62
62
|
SERVER_USER: ${{ secrets.SERVER_USER }}
|
|
63
63
|
SERVER_PASSWORD: ${{ secrets.SERVER_PASSWORD }}
|
|
64
64
|
run: |
|
|
65
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
65
66
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
66
67
|
MISSING=""
|
|
67
68
|
for NAME in SERVER_HOST SERVER_USER SERVER_PASSWORD; do
|
|
@@ -75,7 +76,9 @@ jobs:
|
|
|
75
76
|
|
|
76
77
|
- name: List repository contents
|
|
77
78
|
run: |
|
|
78
|
-
echo "
|
|
79
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
80
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
81
|
+
m wf_flutter.repo_checked_out
|
|
79
82
|
ls -la
|
|
80
83
|
|
|
81
84
|
# Debug keystore setup - this workflow signs with DEBUG_KEYSTORE (password android, alias androiddebugkey)
|
|
@@ -84,6 +87,7 @@ jobs:
|
|
|
84
87
|
env:
|
|
85
88
|
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
|
|
86
89
|
run: |
|
|
90
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
87
91
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
88
92
|
# This is for internal distribution, so the build proceeds even without the Secret - the runner signs with a freshly created debug key,
|
|
89
93
|
# so the signature differs per build and cannot update an existing install; leave that as a warning.
|
|
@@ -104,29 +108,33 @@ jobs:
|
|
|
104
108
|
env:
|
|
105
109
|
ENV_CONTENT: ${{ secrets.ENV_FILE || secrets.ENV }}
|
|
106
110
|
run: |
|
|
111
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
112
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
107
113
|
if [ "$ENV_MODE" = "dotenv" ]; then
|
|
108
114
|
printf '%s\n' "$ENV_CONTENT" > .env
|
|
109
|
-
|
|
115
|
+
m wf_flutter.dotenv_created
|
|
110
116
|
elif [ -n "$ENV_CONTENT" ]; then
|
|
111
117
|
DART_DEFINE_FILE="$RUNNER_TEMP/dart-define.env"
|
|
112
118
|
printf '%s\n' "$ENV_CONTENT" > "$DART_DEFINE_FILE"
|
|
113
119
|
echo "DART_DEFINE_FILE=$DART_DEFINE_FILE" >> "$GITHUB_ENV"
|
|
114
|
-
|
|
120
|
+
m wf_flutter.dart_define_prepared
|
|
115
121
|
fi
|
|
116
122
|
|
|
117
123
|
- name: Setup Keystore and key.properties
|
|
118
124
|
if: steps.signing.outputs.mode == 'keystore'
|
|
119
125
|
run: |
|
|
126
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
127
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
120
128
|
mkdir -p android/app/keystore
|
|
121
129
|
# Reuse the keystore validated in the previous step
|
|
122
130
|
cp ~/.android/debug.keystore android/app/keystore/key.jks
|
|
123
|
-
|
|
131
|
+
m wf_flutter.keystore_from_debug
|
|
124
132
|
ls -la android/app/keystore
|
|
125
133
|
echo "storeFile=app/keystore/key.jks" > android/key.properties
|
|
126
134
|
echo "storePassword=android" >> android/key.properties
|
|
127
135
|
echo "keyAlias=androiddebugkey" >> android/key.properties
|
|
128
136
|
echo "keyPassword=android" >> android/key.properties
|
|
129
|
-
|
|
137
|
+
m wf_flutter.key_properties_created
|
|
130
138
|
ls -la android/
|
|
131
139
|
|
|
132
140
|
# Create google-services.json (optional) - no empty file is written when the Secret is empty
|
|
@@ -134,12 +142,14 @@ jobs:
|
|
|
134
142
|
env:
|
|
135
143
|
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
|
|
136
144
|
run: |
|
|
145
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
146
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
137
147
|
if [ -n "$GOOGLE_SERVICES_JSON" ]; then
|
|
138
148
|
mkdir -p android/app
|
|
139
149
|
printf '%s' "$GOOGLE_SERVICES_JSON" > android/app/google-services.json
|
|
140
|
-
|
|
150
|
+
m wf_flutter.google_services_created
|
|
141
151
|
else
|
|
142
|
-
|
|
152
|
+
m wf_flutter.google_services_skipped
|
|
143
153
|
fi
|
|
144
154
|
|
|
145
155
|
- name: Set up Flutter
|
|
@@ -151,7 +161,9 @@ jobs:
|
|
|
151
161
|
|
|
152
162
|
- name: Verify Flutter version
|
|
153
163
|
run: |
|
|
154
|
-
echo "
|
|
164
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
165
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
166
|
+
m wf_flutter.flutter_setup_done
|
|
155
167
|
flutter --version
|
|
156
168
|
|
|
157
169
|
- name: Cache Flutter dependencies
|
|
@@ -173,21 +185,24 @@ jobs:
|
|
|
173
185
|
|
|
174
186
|
- name: Install dependencies
|
|
175
187
|
run: |
|
|
188
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
189
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
176
190
|
flutter pub get
|
|
177
191
|
if grep -q "build_runner" pubspec.yaml; then
|
|
178
192
|
dart run build_runner build --delete-conflicting-outputs
|
|
179
193
|
fi
|
|
180
|
-
|
|
194
|
+
m wf_flutter.deps_installed
|
|
181
195
|
ls -la
|
|
182
196
|
|
|
183
197
|
- name: Setup Gradle
|
|
184
198
|
working-directory: ${{ env.FLUTTER_PROJECT_DIR }}/android
|
|
185
199
|
run: |
|
|
200
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
186
201
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
187
202
|
# The default flutter create .gitignore does not commit gradlew - flutter build creates it when missing
|
|
188
203
|
if [ -f gradlew ]; then
|
|
189
204
|
chmod +x gradlew
|
|
190
|
-
|
|
205
|
+
m wf_flutter.gradle_perm
|
|
191
206
|
else
|
|
192
207
|
m flutter_a.gradlew_missing
|
|
193
208
|
fi
|
|
@@ -200,12 +215,15 @@ jobs:
|
|
|
200
215
|
|
|
201
216
|
- name: Verify Java version
|
|
202
217
|
run: |
|
|
203
|
-
echo "
|
|
218
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
219
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
220
|
+
m wf_flutter.java_setup_done
|
|
204
221
|
java -version
|
|
205
222
|
|
|
206
223
|
- name: Get version info and calculate short commit hash
|
|
207
224
|
id: version_info
|
|
208
225
|
run: |
|
|
226
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
209
227
|
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
210
228
|
CURRENT_VERSION=$(grep 'version:' pubspec.yaml | sed 's/version: //' | tr -d ' ')
|
|
211
229
|
VERSION=$(echo $CURRENT_VERSION | cut -d'+' -f1)
|
|
@@ -223,15 +241,19 @@ jobs:
|
|
|
223
241
|
# APK build (keeps the release build - built directly with flutter)
|
|
224
242
|
- name: Build APK
|
|
225
243
|
run: |
|
|
244
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
245
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
226
246
|
flutter build apk --release ${DART_DEFINE_FILE:+--dart-define-from-file="$DART_DEFINE_FILE"}
|
|
227
247
|
ls -la build/app/outputs/flutter-apk/ || true
|
|
228
|
-
|
|
248
|
+
m wf_flutter.apk_built
|
|
229
249
|
|
|
230
250
|
- name: Rename and Prepare APK
|
|
231
251
|
run: |
|
|
252
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
253
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
232
254
|
mkdir -p ./android/app/build/outputs/apk/release/
|
|
233
255
|
mv ./build/app/outputs/flutter-apk/app-release.apk ./android/app/build/outputs/apk/release/${{ env.APP_ARTIFACT_NAME }}-v${{ env.VERSION }}-${{ env.SHORT_COMMIT_HASH }}.apk
|
|
234
|
-
|
|
256
|
+
m wf_flutter.apk_renamed name="${{ env.APP_ARTIFACT_NAME }}-v${{ env.VERSION }}-${{ env.SHORT_COMMIT_HASH }}.apk"
|
|
235
257
|
ls -la ./android/app/build/outputs/apk/release/
|
|
236
258
|
|
|
237
259
|
- name: Upload APK as Artifact
|
|
@@ -253,14 +275,18 @@ jobs:
|
|
|
253
275
|
|
|
254
276
|
- name: List repository contents for deploy
|
|
255
277
|
run: |
|
|
256
|
-
echo "
|
|
278
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
279
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
280
|
+
m wf_flutter.repo_checked_out_deploy
|
|
257
281
|
ls -la
|
|
258
282
|
|
|
259
283
|
- name: Install dependencies
|
|
260
284
|
run: |
|
|
285
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
286
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
261
287
|
sudo apt-get update
|
|
262
288
|
sudo apt-get install -y smbclient jq
|
|
263
|
-
|
|
289
|
+
m wf_flutter.smb_deps_installed
|
|
264
290
|
|
|
265
291
|
- name: Download build artifacts
|
|
266
292
|
uses: actions/download-artifact@v8
|
|
@@ -270,36 +296,44 @@ jobs:
|
|
|
270
296
|
|
|
271
297
|
- name: List downloaded structure (Debug)
|
|
272
298
|
run: |
|
|
299
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
300
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
273
301
|
ls -alR android/app/build/outputs
|
|
274
|
-
|
|
302
|
+
m wf_flutter.download_listed
|
|
275
303
|
|
|
276
304
|
- name: Find APK file
|
|
277
305
|
run: |
|
|
306
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
307
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
278
308
|
APK_FILE=$(find android/app/build/outputs/ -name "*.apk" | head -n 1)
|
|
279
309
|
echo "APK_FILE=$APK_FILE" >> $GITHUB_ENV
|
|
280
310
|
APK_NAME=$(basename "$APK_FILE")
|
|
281
311
|
echo "APK_NAME=$APK_NAME" >> $GITHUB_ENV
|
|
282
|
-
|
|
312
|
+
m wf_flutter.apk_file_found file="$APK_FILE"
|
|
283
313
|
|
|
284
314
|
- name: Upload files to server via SMB
|
|
285
315
|
env:
|
|
286
316
|
SMB_USERNAME: ${{ secrets.SERVER_USER }}
|
|
287
317
|
SMB_PASSWORD: ${{ secrets.SERVER_PASSWORD }}
|
|
288
318
|
run: |
|
|
319
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
320
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
289
321
|
SMB_SERVER=${{ secrets.SERVER_HOST }}
|
|
290
322
|
SMB_PORT=${{ env.SMB_PORT }}
|
|
291
323
|
SMB_SHARE=${{ env.SMB_SHARE }}
|
|
292
324
|
SMB_PATH="/${{ env.APP_ARTIFACT_NAME }}${{ env.SMB_PATH_ANDROID }}"
|
|
293
|
-
|
|
294
|
-
|
|
325
|
+
m wf_flutter.smb_uploading name="${{ env.APK_NAME }}"
|
|
326
|
+
m wf_flutter.smb_path path="$SMB_PATH"
|
|
295
327
|
smbclient "//$SMB_SERVER/$SMB_SHARE" -p "$SMB_PORT" -U "$SMB_USERNAME%$SMB_PASSWORD" -m SMB3 -d 10 -c "mkdir $SMB_PATH; cd $SMB_PATH; put ${{ env.APK_FILE }} ${{ env.APK_NAME }}"
|
|
296
|
-
|
|
328
|
+
m wf_flutter.smb_uploaded
|
|
297
329
|
|
|
298
330
|
- name: Update CICD history JSON
|
|
299
331
|
env:
|
|
300
332
|
SMB_USERNAME: ${{ secrets.SERVER_USER }}
|
|
301
333
|
SMB_PASSWORD: ${{ secrets.SERVER_PASSWORD }}
|
|
302
334
|
run: |
|
|
335
|
+
[ -f "$GITHUB_WORKSPACE/.github/scripts/messages.py" ] || { echo "::error::messages.py is missing; rerun \`npx project-auto-wizard --mode full --force\`"; exit 1; }
|
|
336
|
+
m() { (cd "$GITHUB_WORKSPACE" && python3 .github/scripts/messages.py get "$@"); }
|
|
303
337
|
export TZ='Asia/Seoul'
|
|
304
338
|
BUILD_DATE=$(date +"%Y-%m-%d %H:%M")
|
|
305
339
|
FILE_SIZE=$(stat -c%s "${{ env.APK_FILE }}")
|
|
@@ -321,12 +355,12 @@ jobs:
|
|
|
321
355
|
SMB_PATH="/${{ env.APP_ARTIFACT_NAME }}${{ env.SMB_PATH_ANDROID }}"
|
|
322
356
|
|
|
323
357
|
smbclient "//$SMB_SERVER/$SMB_SHARE" -p "$SMB_PORT" -U "$SMB_USERNAME%$SMB_PASSWORD" -m SMB3 -d 10 -c "cd $SMB_PATH; get $HISTORY_FILE" || echo '{"files": []}' > $HISTORY_FILE
|
|
324
|
-
|
|
358
|
+
m wf_flutter.history_loaded file="$HISTORY_FILE"
|
|
325
359
|
cat $HISTORY_FILE
|
|
326
360
|
|
|
327
361
|
jq --argjson new_build "$NEW_BUILD_INFO" '.files += [$new_build]' $HISTORY_FILE > updated.json
|
|
328
|
-
|
|
362
|
+
m wf_flutter.history_updated file="$HISTORY_FILE"
|
|
329
363
|
cat updated.json
|
|
330
364
|
|
|
331
365
|
smbclient "//$SMB_SERVER/$SMB_SHARE" -p "$SMB_PORT" -U "$SMB_USERNAME%$SMB_PASSWORD" -m SMB3 -d 10 -c "cd $SMB_PATH; put updated.json $HISTORY_FILE"
|
|
332
|
-
|
|
366
|
+
m wf_flutter.history_uploaded file="$HISTORY_FILE"
|