142142 echo -e " ${GREEN} ✓${RESET} CI device linked"
143143fi
144144
145- # --- Step 8: Package identity repo ---
145+ # --- Step 8: Package identity repo (for release signing) ---
146146AUTHS_DIR=" ${HOME} /.auths"
147147echo -e " ${DIM} Packaging identity repo...${RESET} "
148148
@@ -161,6 +161,17 @@ tar -czf "$BUNDLE_PATH" \
161161
162162IDENTITY_BUNDLE_B64=$( base64 < " $BUNDLE_PATH " | tr -d ' \n' )
163163
164+ # --- Step 8b: Export identity bundle JSON (for CI artifact verification) ---
165+ echo -e " ${DIM} Exporting identity bundle JSON (1-year TTL)...${RESET} "
166+ BUNDLE_JSON_PATH=" $TMPDIR_WORK /identity-bundle.json"
167+ auths id export-bundle \
168+ --alias ci-release-device \
169+ --output " $BUNDLE_JSON_PATH " \
170+ --max-age-secs 31536000
171+
172+ IDENTITY_BUNDLE_JSON=$( cat " $BUNDLE_JSON_PATH " )
173+ echo -e " ${GREEN} ✓${RESET} Identity bundle JSON exported (expires in 1 year)"
174+
164175# --- Step 9: Set GitHub secrets ---
165176echo " "
166177echo -e " ${GREEN} ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET} "
@@ -186,10 +197,11 @@ if [ "$GH_OK" -eq 1 ]; then
186197 echo -n " $CI_PASS " | gh secret set AUTHS_CI_PASSPHRASE --repo " $REPO " || GH_OK=0
187198 echo -n " $KEYCHAIN_B64 " | gh secret set AUTHS_CI_KEYCHAIN --repo " $REPO " || GH_OK=0
188199 echo -n " $IDENTITY_BUNDLE_B64 " | gh secret set AUTHS_CI_IDENTITY_BUNDLE --repo " $REPO " || GH_OK=0
200+ echo -n " $IDENTITY_BUNDLE_JSON " | gh secret set AUTHS_CI_IDENTITY_BUNDLE_JSON --repo " $REPO " || GH_OK=0
189201fi
190202
191203if [ " $GH_OK " -eq 1 ]; then
192- echo -e " ${GREEN} ✓${RESET} All 3 secrets set on ${CYAN}${REPO}${RESET} "
204+ echo -e " ${GREEN} ✓${RESET} All 4 secrets set on ${CYAN}${REPO}${RESET} "
193205else
194206 echo -e " ${YELLOW} Could not set secrets automatically.${RESET} "
195207 echo -e " ${DIM} Try: gh auth login then re-run, or add manually:${RESET} "
203215 echo " "
204216 echo -e " ${BOLD} AUTHS_CI_IDENTITY_BUNDLE${RESET} "
205217 echo " $IDENTITY_BUNDLE_B64 "
218+ echo " "
219+ echo -e " ${BOLD} AUTHS_CI_IDENTITY_BUNDLE_JSON${RESET} "
220+ echo " $IDENTITY_BUNDLE_JSON "
206221fi
207222
208223echo " "
0 commit comments