Skip to content

Commit 9e4415e

Browse files
committed
fix release asset publication
1 parent c37d2ab commit 9e4415e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/deploy-github-pages.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ jobs:
152152
runs-on: ubuntu-latest
153153
env:
154154
RELEASE_ARCHIVE_NAME: prompterlive-pages.zip
155+
RELEASE_ARTIFACT_NAME: prompterlive-release-package
155156
RELEASE_ARTIFACT_ROOT: .artifacts/release-artifact
156157

157158
permissions:
@@ -164,13 +165,24 @@ jobs:
164165
name: ${{ env.RELEASE_ARTIFACT_NAME }}
165166
path: ${{ env.RELEASE_ARTIFACT_ROOT }}
166167

168+
- name: Resolve release asset path
169+
id: release_asset
170+
run: |
171+
release_asset="$(find "$RELEASE_ARTIFACT_ROOT" -type f -name "$RELEASE_ARCHIVE_NAME" | head -n 1)"
172+
if [ -z "$release_asset" ]; then
173+
echo "Expected release archive '$RELEASE_ARCHIVE_NAME' was not found under '$RELEASE_ARTIFACT_ROOT'." >&2
174+
exit 1
175+
fi
176+
177+
echo "release_asset=$release_asset" >> "$GITHUB_OUTPUT"
178+
167179
- name: Create or update release tag and GitHub Release
168180
env:
169181
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
170182
RELEASE_TAG: ${{ needs.prepare_release.outputs.release_tag }}
171183
RELEASE_TITLE: PrompterLive ${{ needs.prepare_release.outputs.release_version }}
172184
run: |
173-
release_asset="$RELEASE_ARTIFACT_ROOT/$RELEASE_ARCHIVE_NAME"
185+
release_asset="${{ steps.release_asset.outputs.release_asset }}"
174186
if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
175187
gh release upload "$RELEASE_TAG" "$release_asset" --clobber
176188
gh release edit "$RELEASE_TAG" --title "$RELEASE_TITLE"

ci-workflows-release-pr-validation.plan.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ Root-cause note:
258258
- `dotnet format /Users/ksemenenko/Developer/PrompterLive/PrompterLive.slnx`
259259
- Local workflow validation after the release-env scoping fix passed:
260260
- `actionlint /Users/ksemenenko/Developer/PrompterLive/.github/workflows/*.yml`
261+
- GitHub run `23817606264` proved the release pipeline now reaches the publishing stages cleanly, but it still failed in `Publish GitHub Release`:
262+
- Root cause note: the release-publication job did not define `RELEASE_ARTIFACT_NAME`, so `actions/download-artifact` downloaded both `github-pages` and the release bundle. The subsequent `gh release create` step then looked for `.artifacts/release-artifact/prompterlive-pages.zip`, but the real zip sat inside the downloaded artifact subdirectory.
263+
- Intended fix path: explicitly request the `prompterlive-release-package` artifact and resolve the archive path dynamically before calling `gh release create` or `gh release upload`.
261264

262265
## Final Validation Skills And Commands
263266

0 commit comments

Comments
 (0)