File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,8 @@ jobs:
248248 runs-on : ubuntu-latest
249249 steps :
250250 - uses : actions/checkout@v4
251+ with :
252+ fetch-depth : 1
251253 - uses : dtolnay/rust-toolchain@stable
252254 - name : Check Rust formatting
253255 run : cargo fmt --check
@@ -271,6 +273,30 @@ jobs:
271273 # check diff with `--staged`.
272274 run : |
273275 git diff --staged --no-ext-diff --quiet --exit-code
276+ - name : Detect need for mozjs-sys version bump
277+ if : ${{ github.event_name == 'pull_request' }}
278+ id : changes
279+ uses : dorny/paths-filter@v3
280+ with :
281+ filters : |
282+ needs_mozjs_sys_bump:
283+ - 'mozjs-sys/src/*.cpp'
284+ - 'mozjs-sys/mozjs/**'
285+ - 'mozjs-sys/*'
286+
287+ - name : Ensure mozjs-sys version is bumped
288+ if : ${{ github.event_name == 'pull_request' && steps.changes.outputs.needs_mozjs_sys_bump == 'true' }}
289+ run : |
290+ git fetch origin main
291+ CHANGED=$(git diff origin/main -- mozjs-sys/Cargo.toml | grep '^+\s*version\s*=' || true)
292+ if [ -n "$CHANGED" ]; then
293+ echo "✅ mozjs-sys version bumped: $CHANGED"
294+ exit 0
295+ else
296+ echo "❌ No mozjs-sys version bump found."
297+ echo "Please bump mozjs-sys version to trigger publishing new artifacts on landing."
298+ exit 1
299+ fi
274300
275301 publish-release :
276302 name : Check version and publish release
You can’t perform that action at this time.
0 commit comments