ci: use official download-artifact action (#6954)

Reviewed-by: Nerixyz <nerixdev@outlook.de>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
Guiii
2026-08-22 10:41:33 +00:00
committed by GitHub
parent ab02b5911e
commit 986f234eb4
+41 -3
View File
@@ -11,6 +11,10 @@ on:
- "release/*"
workflow_dispatch:
permissions:
contents: read
actions: read
jobs:
create-installer:
runs-on: windows-latest
@@ -19,18 +23,52 @@ jobs:
strategy:
matrix:
qt-version: ["6.8.3"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # allows for tags access
persist-credentials: false
- name: Resolve Build workflow run
id: resolve-build-run
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
result-encoding: string
script: |
if (context.eventName === "workflow_run") {
return String(context.payload.workflow_run.id);
}
const { owner, repo } = context.repo;
// Manual runs do not have a triggering workflow_run payload.
// Match the previous commit-based artifact lookup behavior.
const response = await github.rest.actions.listWorkflowRuns({
owner,
repo,
workflow_id: "build.yml",
head_sha: context.sha,
status: "success",
per_page: 1,
});
const run = response.data.workflow_runs[0];
if (!run) {
core.setFailed(`No successful Build workflow run found for commit ${context.sha}.`);
return "";
}
return String(run.id);
- name: Download artifact
uses: dawidd6/action-download-artifact@8305c0f1062bb0d184d09ef4493ecb9288447732 # v20
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
workflow: build.yml
name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip
commit: ${{ github.sha }}
github-token: ${{ github.token }}
repository: ${{ github.repository }}
run-id: ${{ steps.resolve-build-run.outputs.result }}
path: build/
- name: Unzip