ci: modernize Actions (Node 24) and harden the deploy#64
Merged
Conversation
GitHub Actions runners now default JS-action runtime to Node 24 and warn on actions declaring node20. Bump the standard actions to their current node24 majors (checkout@v7, setup-node@v6, setup-python dropped, upload-artifact@v7, download-artifact@v8) and the build's node-version to 24, matching local dev. Replace the archived actions/create-release@v1 + actions/upload-release-asset@v1 (node12, unmaintained since 2020) with softprops/action-gh-release@v3, preserving the draft-release behavior so a human still publishes. This also lets the release job drop the now redundant checkout/setup-python/find-the-file steps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The publish step curl'd tw-calc.net with no error handling, so when the host's anti-bot protection (WEDOS Global Protection) answered with an HTTP 200 ALTCHA challenge page instead of running the publish, the Deploy job went green while the userscript was never actually published. Harden deploy.sh: set -euo pipefail, use curl --fail-with-body so HTTP >= 400 fails the job, and detect an intercepted challenge/HTML response (WEDOS/ALTCHA markers) and exit 1 with a clear ::error:: annotation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
node20(changelog). Node 20 itself is also EOL.curlwith an HTTP 200 ALTCHA challenge page instead of running the publish, and the Deploy job still went green. The live script stayed on 2.11.3.What
Standard actions → current node24 majors (
ci.yml+deploy.yml):actions/checkout@v4 → @v7actions/setup-node@v4 → @v6actions/upload-artifact@v4 → @v7actions/download-artifact@v4 → @v8node-version: 20 → 24(matches local dev; noengines/.nvmrcpin)Release job — replace archived actions:
actions/create-release@v1+actions/upload-release-asset@v1(Node 12, archived since 2020) →softprops/action-gh-release@v3, which:draft: true(a human still edits notes + publishes — Deploy is unchanged),dist/*.user.jsdirectly, dropping the redundantcheckout/setup-python/ find-the-file steps,permissions: contents: write.ci/deploy.sh— fail loudly:set -euo pipefailcurl --fail-with-bodyso HTTP >= 400 fails the jobexit 1with a::error::annotationValidation
deploy.sh:bash -nclean; challenge-detection verified to flag the WEDOS/ALTCHA page and pass JSON/plain-text responses.softpropsswap and the deploy hardening can't be fully exercised until the next release.🤖 Generated with Claude Code