ci: try to fix release again#352
Conversation
Signed-off-by: Henry Schreiner <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adjusts GitHub Actions CI/CD checkout and release publishing behavior, likely to address release asset upload failures.
Changes:
- Removed
fetch-depth: 0fromactions/checkoutsteps in CI and CD workflows (default shallow checkout). - Changed the webapp artifact upload/download to use the
out/directory rather thanrepo-review-app.zip. - Added a checkout step in the release publish job and updated attestation + release upload paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Removes full-history checkout across CI jobs. |
.github/workflows/cd.yml |
Changes webapp artifact shape to out/ and updates attestation + gh release upload logic accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with: | ||
| name: repo-review-app | ||
| path: repo-review-app.zip | ||
| path: out/ |
There was a problem hiding this comment.
Prepare release asset still creates repo-review-app.zip, but the workflow no longer uploads that zip as the artifact (it now uploads out/). This makes the zip generation dead work and also changes what will later be published; either upload/attest the zip (and keep this step), or remove the zip creation and consistently treat the release asset as individual files.
| - name: Attest | ||
| uses: actions/attest@v4 | ||
| with: | ||
| subject-path: "${{ github.workspace }}/repo-review-app.zip" | ||
| subject-path: "${{ github.workspace }}/out/*" | ||
|
|
||
| - name: Upload webapp asset to release | ||
| run: gh release upload "$GITHUB_REF_NAME" repo-review-app.zip | ||
| run: gh release upload "$GITHUB_REF_NAME" out/ | ||
| env: |
There was a problem hiding this comment.
gh release upload expects file path(s), but this passes the out/ directory. This will fail (directories can't be uploaded as release assets) and also doesn't match the artifact contents. Use a file glob like out/* (or reintroduce uploading repo-review-app.zip) and ensure the attestation subject-path matches the exact files being uploaded.
| - uses: actions/download-artifact@v8 | ||
| with: | ||
| name: repo-review-app | ||
| path: . | ||
| path: out/ | ||
|
|
||
| - name: Attest | ||
| uses: actions/attest@v4 | ||
| with: | ||
| subject-path: "${{ github.workspace }}/repo-review-app.zip" | ||
| subject-path: "${{ github.workspace }}/out/*" | ||
|
|
There was a problem hiding this comment.
The artifact is uploaded from path: out/, which stores files under an out/ prefix inside the artifact. Downloading that artifact to path: out/ will typically recreate the same prefix (ending up with out/out/...), which would break later references to ${{ github.workspace }}/out/* and the upload step. Consider either downloading to the workspace root (path: .) or uploading out/* so the downloaded layout matches the expected out/* paths.
|
@copilot address the review. |
Addressed all three review issues in ef69b80:
|
Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: henryiii <[email protected]>
Fixing again.