Skip to content

Commit cd3327d

Browse files
committed
Upload JSON to artifacts
1 parent 5e07380 commit cd3327d

2 files changed

Lines changed: 10 additions & 42 deletions

File tree

.github/workflows/build-rc-auto.yml

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -164,46 +164,15 @@ jobs:
164164
E2E_OPENAI_API_KEY: ${{ secrets.E2E_OPENAI_API_KEY }}
165165
E2E_GEMINI_API_KEY: ${{ secrets.E2E_GEMINI_API_KEY }}
166166

167-
- name: Upload test plan JSON to GitHub Pages
167+
- name: Upload test plan JSON artifact
168168
if: always()
169-
continue-on-error: true
170-
run: |
171-
VERSION="${{ needs.validate-and-find-pr.outputs.semver }}"
172-
JSON_FILE="release-test-plan.json"
173-
174-
# Check if JSON file was generated
175-
if [ ! -f "$JSON_FILE" ]; then
176-
echo "No test plan JSON file found, skipping upload"
177-
exit 0
178-
fi
179-
180-
# Save JSON to temp
181-
cp "$JSON_FILE" "/tmp/test-plan-${VERSION}.json"
182-
183-
# Configure git
184-
git config user.name "github-actions[bot]"
185-
git config user.email "github-actions[bot]@users.noreply.github.com"
186-
187-
# Fetch gh-pages branch or create it
188-
git fetch origin gh-pages:gh-pages 2>/dev/null || echo "gh-pages doesn't exist yet"
189-
190-
# Switch to gh-pages
191-
if git checkout gh-pages 2>/dev/null; then
192-
echo "Switched to existing gh-pages branch"
193-
else
194-
git checkout --orphan gh-pages
195-
git rm -rf . 2>/dev/null || true
196-
git clean -fd 2>/dev/null || true
197-
fi
198-
199-
# Create test-plans directory and copy JSON
200-
mkdir -p test-plans
201-
cp "/tmp/test-plan-${VERSION}.json" "test-plans/"
202-
203-
# Commit and push
204-
git add test-plans/
205-
git commit -m "Add test plan JSON for RC ${VERSION}" || echo "No changes to commit"
206-
git push origin gh-pages
169+
uses: actions/upload-artifact@v4
170+
with:
171+
name: test-plan-${{ needs.validate-and-find-pr.outputs.semver }}
172+
path: release-test-plan.json
173+
compression-level: 0
174+
if-no-files-found: ignore
175+
retention-days: 90
207176

208177
slack-notification:
209178
name: Slack RC Notification

scripts/build-announce/test-plan-section.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ export function buildTestPlanSection(testPlan: TestPlanResult): string {
199199
md += `---\n`;
200200
md += `*Generated by AI Test Plan Analyzer (${testPlan.model}) at ${testPlan.generatedAt}*\n\n`;
201201

202-
// JSON link for automation (version will be replaced by caller)
202+
// JSON link - artifact is uploaded separately and available in the Actions run
203203
if (testPlan.version) {
204-
const jsonUrl = `https://metamask.github.io/metamask-mobile/test-plans/test-plan-${testPlan.version}.json`;
205-
md += `AI generated test plan (JSON): [test-plan-${testPlan.version}.json](${jsonUrl})\n\n`;
204+
md += `AI generated test plan (JSON): Available as artifact \`test-plan-${testPlan.version}\` in the [build workflow](${process.env.BUILD_PIPELINE_URL || '#'})\n\n`;
206205
}
207206

208207
return md;

0 commit comments

Comments
 (0)