Skip to content

ci: modernize Actions (Node 24) and harden the deploy#64

Merged
timzatko merged 2 commits into
mainfrom
chore/actions-node24
Jun 29, 2026
Merged

ci: modernize Actions (Node 24) and harden the deploy#64
timzatko merged 2 commits into
mainfrom
chore/actions-node24

Conversation

@timzatko

@timzatko timzatko commented Jun 29, 2026

Copy link
Copy Markdown
Member

Why

  1. GitHub Actions runners now default the JS-action runtime to Node 24 and warn on any action still declaring node20 (changelog). Node 20 itself is also EOL.
  2. A v2.11.4 deploy revealed the publish step can silently fail: the host's anti-bot protection (WEDOS Global Protection) answered the CI curl with 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 → @v7
  • actions/setup-node@v4 → @v6
  • actions/upload-artifact@v4 → @v7
  • actions/download-artifact@v4 → @v8
  • build node-version: 20 → 24 (matches local dev; no engines/.nvmrc pin)

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:

  • keeps draft: true (a human still edits notes + publishes — Deploy is unchanged),
  • uploads dist/*.user.js directly, dropping the redundant checkout / setup-python / find-the-file steps,
  • adds explicit permissions: contents: write.

ci/deploy.sh — fail loudly:

  • set -euo pipefail
  • curl --fail-with-body so HTTP >= 400 fails the job
  • detect an intercepted challenge/HTML response (WEDOS/ALTCHA markers) and exit 1 with a ::error:: annotation

Note: this only makes a blocked deploy visible. The actual unblocking (a WEDOS bypass rule for /service/userscript-publish, or deploying off-WAF) is a server-side change handled separately.

Validation

  • YAML parses; non-release jobs (commitlint/lint/test/build) pass on this PR's CI run with no deprecation annotations.
  • deploy.sh: bash -n clean; challenge-detection verified to flag the WEDOS/ALTCHA page and pass JSON/plain-text responses.
  • ⚠️ The release job and deploy run only on tags / published releases, so the softprops swap and the deploy hardening can't be fully exercised until the next release.

🤖 Generated with Claude Code

timzatko and others added 2 commits June 29, 2026 12:48
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>
@timzatko timzatko changed the title ci: move GitHub Actions off the deprecated Node 20 runtime ci: modernize Actions (Node 24) and harden the deploy Jun 29, 2026
@timzatko timzatko merged commit a5f3b65 into main Jun 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant