diff --git a/.github/workflows/build-executable-task.yml b/.github/workflows/build-executable-task.yml index 2c38f29f..f8651d7c 100644 --- a/.github/workflows/build-executable-task.yml +++ b/.github/workflows/build-executable-task.yml @@ -65,7 +65,10 @@ jobs: -property:PackageVersion=${{ needs.get-version.outputs.SemVer2 }} # Branch-suffixed so the publisher can build `main` and `develop` in one run without colliding on the name. + # Skipped on smoke: the aggregation job below is `!smoke`, so the per-runtime output has no consumer and would + # only burn artifact storage; smoke just needs the compile to succeed. - name: Upload matrix build artifacts step + if: ${{ !inputs.smoke }} uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: publish-${{ inputs.branch }}-${{ matrix.runtime }} diff --git a/.github/workflows/build-nugetlibrary-task.yml b/.github/workflows/build-nugetlibrary-task.yml index 9b121d2a..7933c121 100644 --- a/.github/workflows/build-nugetlibrary-task.yml +++ b/.github/workflows/build-nugetlibrary-task.yml @@ -18,6 +18,12 @@ on: branch: required: true type: string + # Smoke mode: build for validation only and skip the release-asset zip/upload. A PR smoke run has no consumer + # for the artifact (the github-release job is gated `!smoke`), so uploading it just burns artifact storage. + smoke: + required: false + type: boolean + default: false jobs: @@ -67,11 +73,14 @@ jobs: --skip-duplicate - name: Zip output step + if: ${{ !inputs.smoke }} run: 7z a -t7z ${{ runner.temp }}/NuGetLibrary.7z ${{ runner.temp }}/publish/* # GitHub-release asset, uploaded under the `release-asset--*` pattern that the `github-release` job # collects. Branch-suffixed so the publisher can build both branches in one run without colliding on the name. + # Skipped on smoke: the github-release job is `!smoke`, so nothing would consume it. - name: Upload build artifacts step + if: ${{ !inputs.smoke }} uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: release-asset-${{ inputs.branch }}-nugetlibrary diff --git a/.github/workflows/build-pypilibrary-task.yml b/.github/workflows/build-pypilibrary-task.yml index 3c5493de..c780c30c 100644 --- a/.github/workflows/build-pypilibrary-task.yml +++ b/.github/workflows/build-pypilibrary-task.yml @@ -17,6 +17,12 @@ on: branch: required: true type: string + # Smoke mode: build for validation only and skip the artifact upload. A PR smoke run has no consumer for the + # wheel/sdist (the publish-pypi job runs only on a real publish), so uploading it just burns artifact storage. + smoke: + required: false + type: boolean + default: false outputs: artifact-name: value: ${{ jobs.build-pypilibrary.outputs.artifact-name }} @@ -104,8 +110,10 @@ jobs: run: uv build # Branch-suffixed so the publisher's branch matrix can build both branches in one run without colliding. + # Skipped on smoke: the publish-pypi job runs only on a real publish, so nothing would consume it. - name: Upload build artifacts step id: artifact-upload-step + if: ${{ !inputs.smoke }} uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: pypilibrary-build-${{ inputs.branch }} diff --git a/.github/workflows/build-release-task.yml b/.github/workflows/build-release-task.yml index af3d782c..9f9924f8 100644 --- a/.github/workflows/build-release-task.yml +++ b/.github/workflows/build-release-task.yml @@ -74,6 +74,8 @@ jobs: branch: ${{ inputs.branch }} # Push to NuGet.org, never on a smoke build. push: ${{ inputs.nuget && !inputs.smoke }} + # Skip the release-asset upload on smoke (nothing consumes it on a PR). + smoke: ${{ inputs.smoke }} # PyPI publishing happens in `publish-release.yml`, not here, so `id-token: write` is only granted at the # entry-point job; this workflow just builds and uploads the artifact for that job to download. @@ -87,6 +89,8 @@ jobs: # Pin to the resolved commit so the artifacts match the release tag. ref: ${{ needs.get-version.outputs.GitCommitId }} branch: ${{ inputs.branch }} + # Skip the wheel/sdist upload on smoke (the publish-pypi job runs only on a real publish). + smoke: ${{ inputs.smoke }} build-executable: name: Build executable job