@daemux/store-automator 0.5.1 → 0.5.2
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.
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "App Store & Google Play automation for Flutter apps",
|
|
8
|
-
"version": "0.5.
|
|
8
|
+
"version": "0.5.2"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "store-automator",
|
|
13
13
|
"source": "./plugins/store-automator",
|
|
14
14
|
"description": "3 agents for app store publishing: reviewer, meta-creator, media-designer",
|
|
15
|
-
"version": "0.5.
|
|
15
|
+
"version": "0.5.2",
|
|
16
16
|
"keywords": ["flutter", "app-store", "google-play", "fastlane", "codemagic"]
|
|
17
17
|
}
|
|
18
18
|
]
|
package/package.json
CHANGED
|
@@ -42,21 +42,29 @@ The Codemagic pipeline runs two parallel workflows on push to `main`:
|
|
|
42
42
|
**iOS Release**: Flutter analyze -> Flutter test -> Build IPA -> Code signing -> Upload metadata + screenshots -> Deploy to App Store Connect -> Sync IAP
|
|
43
43
|
**Android Release**: Flutter analyze -> Flutter test -> Build AAB -> Keystore signing -> Check Google Play readiness -> Deploy to Google Play -> Sync IAP
|
|
44
44
|
|
|
45
|
+
### Token Resolution
|
|
46
|
+
|
|
47
|
+
The Codemagic API token is stored in `ci.config.yaml` under `codemagic.api_token`. Read it from there — NEVER ask the user for it. If the field is empty, warn the user to fill `codemagic.api_token` in `ci.config.yaml` and stop.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Extract token from ci.config.yaml
|
|
51
|
+
CM_API_TOKEN=$(grep 'api_token:' ci.config.yaml | head -1 | sed 's/.*api_token: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | tr -d ' ')
|
|
52
|
+
```
|
|
53
|
+
|
|
45
54
|
### Triggering Builds
|
|
46
55
|
|
|
47
|
-
**Option 1: Git push** (preferred)
|
|
56
|
+
**Option 1: Git push** (preferred when webhooks are configured)
|
|
48
57
|
```bash
|
|
49
58
|
git push origin main
|
|
50
59
|
```
|
|
51
60
|
Codemagic triggers both iOS and Android workflows automatically on push to `main`.
|
|
52
61
|
|
|
53
|
-
**Option 2: Codemagic REST API**
|
|
62
|
+
**Option 2: Codemagic REST API** (preferred for full automation — allows status polling and log reading)
|
|
54
63
|
```bash
|
|
55
|
-
|
|
56
|
-
# Uses src/codemagic-api.mjs functions: startBuild(token, appId, workflowId, branch)
|
|
64
|
+
CM_API_TOKEN=$(grep 'api_token:' ci.config.yaml | head -1 | sed 's/.*api_token: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | tr -d ' ')
|
|
57
65
|
node -e "
|
|
58
66
|
import {startBuild} from './src/codemagic-api.mjs';
|
|
59
|
-
const r = await startBuild(
|
|
67
|
+
const r = await startBuild('$CM_API_TOKEN', '<appId>', '<workflowId>', 'main');
|
|
60
68
|
console.log(JSON.stringify(r, null, 2));
|
|
61
69
|
"
|
|
62
70
|
```
|
|
@@ -64,10 +72,10 @@ node -e "
|
|
|
64
72
|
### Monitoring Build Status
|
|
65
73
|
|
|
66
74
|
```bash
|
|
67
|
-
|
|
75
|
+
CM_API_TOKEN=$(grep 'api_token:' ci.config.yaml | head -1 | sed 's/.*api_token: *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | tr -d ' ')
|
|
68
76
|
node -e "
|
|
69
77
|
import {getBuildStatus} from './src/codemagic-api.mjs';
|
|
70
|
-
const r = await getBuildStatus(
|
|
78
|
+
const r = await getBuildStatus('$CM_API_TOKEN', '<buildId>');
|
|
71
79
|
console.log(JSON.stringify(r, null, 2));
|
|
72
80
|
"
|
|
73
81
|
```
|
|
@@ -38,7 +38,7 @@ Prefer using the devops agent over direct Bash/SSH for structured operations.
|
|
|
38
38
|
## Configuration Files
|
|
39
39
|
|
|
40
40
|
### ci.config.yaml
|
|
41
|
-
Single source of truth: credentials, app identity, store settings, web domain, Codemagic CI/CD (app_id for
|
|
41
|
+
Single source of truth: credentials, app identity, store settings, web domain, Codemagic CI/CD (app_id, api_token for build triggering/monitoring, workflow IDs).
|
|
42
42
|
|
|
43
43
|
### fastlane/metadata/ Structure
|
|
44
44
|
All store listing texts are stored in fastlane directories and managed by the appstore-meta-creator agent:
|
|
@@ -57,8 +57,10 @@ web:
|
|
|
57
57
|
# === CODEMAGIC CI/CD ===
|
|
58
58
|
# Fill after creating app in Codemagic (https://codemagic.io/apps)
|
|
59
59
|
# Find app_id in your Codemagic dashboard URL: codemagic.io/app/{app_id}
|
|
60
|
+
# Generate API token: Codemagic dashboard → Settings → Integrations → Codemagic API → Show
|
|
60
61
|
codemagic:
|
|
61
62
|
app_id: ""
|
|
63
|
+
api_token: ""
|
|
62
64
|
workflows:
|
|
63
65
|
- ios-release
|
|
64
66
|
- android-release
|