fix: use artifact ID for direct download URL instead of nightly.link
Use the artifact-id output from upload-artifact to construct a direct GitHub artifact download URL. No third-party service needed — the URL points to the artifact on GitHub which triggers a download when clicked. https://claude.ai/code/session_0138kUcZaPQoQcAc7nA1KDbf
This commit is contained in:
@@ -47,10 +47,10 @@ jobs:
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const artifactId = `${{ steps.upload.outputs.artifact-id }}`;
|
||||
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
||||
const artifactName = encodeURIComponent('Play Benchmark APK');
|
||||
const nightlyUrl = `https://nightly.link/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/${artifactName}.zip`;
|
||||
const body = `📦 **Benchmark APK ready!**\n\nDownload: [Play Benchmark APK](${nightlyUrl})\n\nOr view all artifacts in the [workflow run](${runUrl}#artifacts).`;
|
||||
const downloadUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${artifactId}`;
|
||||
const body = `📦 **Benchmark APK ready!**\n\nDownload: [Play Benchmark APK](${downloadUrl})\n\nOr view all artifacts in the [workflow run](${runUrl}#artifacts).`;
|
||||
|
||||
await github.rest.repos.createCommitComment({
|
||||
owner: context.repo.owner,
|
||||
|
||||
Reference in New Issue
Block a user