ci: Add skip_validation option to test the release on non-tagged commit
What changed, and why it matters
This commit changes the project's automated release workflow to add a manual testing option. It lets maintainers run the release build process on a non-tagged commit by skipping the normal validation check and forcing a specific version. There is no security vulnerability in the change itself; it is a CI/testing convenience feature.
No security action required. Reviewers may want to confirm that the `skip_validation` input is only usable by authorized maintainers and that the generated artifacts are clearly marked as test-only when validation is skipped.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies .github/workflows/release.yml only. It adds a workflow_dispatch input skip_validation (choice yes/no, default no), sets fetch-depth: 0 on checkouts, and conditionally skips tools/check-release.sh when the workflow is manually triggered with skip_validation=yes. In that mode it also invokes tools/build-release.sh with --force-version, --force-unclean, and --force-mtime to allow building a release-like artifact from an arbitrary commit. The change is gated behind manual workflow dispatch and does not alter default release behavior.
Changed components
.github/workflows/release.ymlInspect captured patch +24 / −1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 73a03c1b..451212b2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,6 +12,13 @@ on:
version:
description: 'Release version'
required: true
+ skip_validation:
+ description: Skip release validation for untagged commit testing
+ default: no
+ type: choice
+ options:
+ - yes
+ - no
create_release:
description: Create a draft release
default: no
@@ -31,6 +38,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
+ fetch-depth: 0
- name: Determine version
run: |
@@ -46,6 +54,7 @@ jobs:
echo "Determined version: $VERSION"
- name: Validate release
+ if: github.event_name != 'workflow_dispatch' || github.event.inputs.skip_validation != 'yes'
run: tools/check-release.sh --version=${VERSION}
- name: Catpure version output
@@ -55,6 +64,8 @@ jobs:
releases:
name: Releases
needs: check
+ env:
+ version: ${{ needs.check.outputs.version }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false # Let each build finish.
@@ -67,6 +78,9 @@ jobs:
steps:
- name: Git checkout
uses: actions/checkout@v4
+ with:
+ ref: ${{ github.ref }}
+ fetch-depth: 0
- name: Build environment setup
run: |
@@ -83,7 +97,13 @@ jobs:
if: contains(matrix.target, 'Ubuntu')
- name: Build release
- run: tools/build-release.sh ${{ matrix.target }}
+ run: |
+ # Allow build release to execute if manually triggered for testing
+ if [ "${{ github.event_name }}" == "workflow_dispatch" && github.event.inputs.skip_validation == 'yes' ]; then
+ tools/build-release.sh ${{ matrix.target }} --force-version "${{ env.version }}" --force-unclean --force-mtime "$(date +%Y-%m-%d)"
+ else
+ tools/build-release.sh ${{ matrix.target }}
+ fi
- name: Upload target artifacts
uses: actions/upload-artifact@v4
@@ -119,6 +139,9 @@ jobs:
steps:
- name: Git checkout
uses: actions/checkout@v4
+ with:
+ ref: ${{ github.ref }}
+ fetch-depth: 0
- name: Download artifact
uses: actions/download-artifact@v4
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.