Skip to content

Commit 6ef80c8

Browse files
committed
fix(ci): resolve artifact download in Snap workflow chain
Verify Snap now re-uploads artifacts so Publish Snap can access them using its workflow_run.id. Added manual workflow_dispatch inputs to allow triggering from intermediate steps.
1 parent 5176983 commit 6ef80c8

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/publish-snap.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- main
1010
workflow_dispatch:
11+
inputs:
12+
verify_run_id:
13+
description: 'Verify Snap workflow run ID'
14+
required: true
1115

1216
jobs:
1317
publish:
@@ -22,7 +26,7 @@ jobs:
2226
uses: actions/download-artifact@v7
2327
with:
2428
name: snap-${{ matrix.arch }}
25-
run-id: ${{ github.event.workflow_run.id }}
29+
run-id: ${{ inputs.verify_run_id || github.event.workflow_run.id }}
2630
github-token: ${{ secrets.GITHUB_TOKEN }}
2731

2832
- name: Publish to Snap Store

.github/workflows/verify-snap.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
types:
77
- completed
88
workflow_dispatch:
9+
inputs:
10+
build_run_id:
11+
description: 'Build Snap workflow run ID'
12+
required: true
913

1014
jobs:
1115
verify-snap:
@@ -26,7 +30,7 @@ jobs:
2630
uses: actions/download-artifact@v7
2731
with:
2832
name: snap-${{ matrix.arch }}
29-
run-id: ${{ github.event.workflow_run.id }}
33+
run-id: ${{ inputs.build_run_id || github.event.workflow_run.id }}
3034
github-token: ${{ secrets.GITHUB_TOKEN }}
3135

3236
- name: Install review-tools
@@ -39,3 +43,9 @@ jobs:
3943
run: |
4044
sudo snap install --dangerous astrogods_*.snap
4145
snap list astrogods
46+
47+
- name: Re-upload snap artifact
48+
uses: actions/upload-artifact@v6
49+
with:
50+
name: snap-${{ matrix.arch }}
51+
path: astrogods_*.snap

0 commit comments

Comments
 (0)