Skip to content

Commit a086680

Browse files
ci: Error if no files found when uploading source artifacts (#3958)
We don't want to proceed with the next CI tasks if we cannot upload the artifacts required for them. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Tightens CI/release behavior by failing jobs when expected artifacts aren’t produced, which could surface previously hidden build issues and block downstream steps. > > **Overview** > Ensures CI stops early if required build outputs aren’t present by setting `if-no-files-found: error` on key `actions/upload-artifact` steps. > > This makes the `build-lint-test` workflow fail when it can’t upload the `snaps-execution-environments` build or overall `build-source` artifacts, and makes `publish-release` fail if release build artifacts aren’t generated. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1b68b38. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent a3872c4 commit a086680

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/build-lint-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
with:
3535
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
3636
retention-days: 1
37+
if-no-files-found: error
3738
path: |
3839
.nvmrc
3940
packages/snaps-execution-environments/dist/webpack
@@ -63,6 +64,7 @@ jobs:
6364
with:
6465
name: build-source-${{ runner.os }}-${{ github.sha }}
6566
retention-days: 1
67+
if-no-files-found: error
6668
path: |
6769
.nvmrc
6870
packages/*/dist

.github/workflows/publish-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
name: publish-release-artifacts-${{ github.sha }}
7575
include-hidden-files: true
7676
retention-days: 4
77+
if-no-files-found: error
7778
path: |
7879
./packages/**/dist
7980
./node_modules/.yarn-state.yml

0 commit comments

Comments
 (0)