diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ab7ca3004..76fc1b54d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,4 +1,5 @@ # SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-FileCopyrightText: 2025 Alper Ozturk # SPDX-FileCopyrightText: 2020-2024 Stefan Niedermann # SPDX-FileCopyrightText: 2023 Álvaro Brey # SPDX-License-Identifier: GPL-3.0-or-later @@ -12,6 +13,7 @@ on: permissions: contents: read + pull-requests: write jobs: validation: @@ -78,3 +80,21 @@ jobs: with: name: app-dev-debug path: app/build/outputs/apk/dev/debug/app-dev-debug.apk + + - name: Comment on PR with artifact link + if: github.event_name == 'pull_request' + uses: actions/github-script@v7 + with: + script: | + const runId = process.env.GITHUB_RUN_ID; + const repo = context.repo.repo; + const owner = context.repo.owner; + const prNumber = context.payload.pull_request.number; + const artifactUrl = `https://github.com/${owner}/${repo}/actions/runs/${runId}`; + + github.rest.issues.createComment({ + owner, + repo, + issue_number: prNumber, + body: `🎉 Debug APK built and uploaded! You can download it from the [workflow artifacts](${artifactUrl}).` + }); \ No newline at end of file