From 5a326fb3e0238577a83e9dab29e22f3555bf177d Mon Sep 17 00:00:00 2001 From: nelsoduarte Date: Fri, 5 Jun 2026 19:09:51 +0100 Subject: [PATCH] chore(ci): force snapcore actions to Node.js 24 runtime GitHub Actions deprecated Node.js 20 actions. From 2026-06-16 the runner will force them to Node.js 24 by default, and the Node.js 20 runtime is removed 2026-09-16. snapcore/action-build and snapcore/action-publish still ship a `node20` runner (upstream migration PR opened 2026-04-05 not merged yet). Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true on the snap job so both pinned actions run under Node.js 24 during the transition. SHAs stay pinned per repository security policy; once snapcore publishes a real Node.js 24 release we bump the SHAs and drop the env var. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/publish.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a727da0..aa76a4a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -218,6 +218,16 @@ jobs: needs: resolve runs-on: ubuntu-22.04 if: ${{ vars.ENABLE_SNAP != 'false' }} + # TEMP: snapcore/action-build and snapcore/action-publish still ship a + # `node20` runner (upstream PR snapcore/action-build#1 / action-publish#1 + # opened 2026-04-05 not merged). GitHub deprecated Node.js 20 actions and + # will force them to Node.js 24 from 2026-06-16; the Node.js 20 runtime + # is removed 2026-09-16. This env var opts these JS actions into the + # Node.js 24 shim early so we keep working through the transition. + # Remove once snapcore publishes a Node.js 24 release and we bump the + # pinned SHAs below. + env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -225,6 +235,7 @@ jobs: - name: Build snap id: build + # v1.3.0 — still node20 upstream; runs on node24 via env var above. uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1 env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} @@ -233,6 +244,7 @@ jobs: if: env.SNAPCRAFT_STORE_CREDENTIALS != '' env: SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }} + # v1.2.0 — still node20 upstream; runs on node24 via env var above. uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 # v1 with: snap: ${{ steps.build.outputs.snap }}