diff --git a/.github/workflows/eas-build.yml b/.github/workflows/eas-build.yml index 985bd1d..9736766 100644 --- a/.github/workflows/eas-build.yml +++ b/.github/workflows/eas-build.yml @@ -48,5 +48,37 @@ jobs: - name: Install dependencies run: npm ci - - name: Trigger EAS build - run: npx eas build --non-interactive --profile "${{ inputs.profile }}" --platform "${{ inputs.platform }}" + - name: Trigger EAS build and wait for completion + run: npx eas build --non-interactive --wait --json --profile "${{ inputs.profile }}" --platform "${{ inputs.platform }}" > eas-build.json + + - name: Publish build links in workflow summary + run: | + node <<'EOF' + const fs = require('node:fs'); + + const raw = fs.readFileSync('eas-build.json', 'utf8').trim(); + const parsed = JSON.parse(raw); + const builds = Array.isArray(parsed) ? parsed : [parsed]; + + const lines = []; + for (const build of builds) { + const platform = String(build.platform || 'unknown').toUpperCase(); + const detailsUrl = build.buildDetailsPageUrl || build.detailsPageUrl || build.url; + const downloadUrl = build?.artifacts?.buildUrl || build?.artifacts?.applicationArchiveUrl; + + if (detailsUrl) { + lines.push(`- ${platform} details: ${detailsUrl}`); + } + if (downloadUrl) { + lines.push(`- ${platform} download: ${downloadUrl}`); + } + } + + const summary = [ + '## EAS Build Results', + '', + ...(lines.length > 0 ? lines : ['- Build finished, but no URLs were returned by EAS CLI.']) + ].join('\n'); + + fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, `${summary}\n`); + EOF