Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,24 @@ jobs:
name: debug-apk
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 7
overwrite: true

- name: Comment PR with artifact link
- name: Add artifact link to summary
if: success()
run: |
echo "### Debug APK" >> $GITHUB_STEP_SUMMARY
echo "Download artifact: [debug-apk](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY
- name: Comment PR with artifact link
# Pull requests from forks get a read-only GITHUB_TOKEN, so the comment would fail the job.
if: success() && github.event_name == 'pull_request' && github.event.pull_request.head.repo != null && github.event.pull_request.head.repo.full_name == github.repository
continue-on-error: true
uses: actions/github-script@v7
with:
script: |
const runUrl = `https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}`;
const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
const comment = `Debug APK built successfully!\n\nDownload artifact: [debug-apk](${runUrl})\n\n_Artifact will be available for 7 days_`;
github.rest.issues.createComment({
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down
Loading