@@ -23,11 +23,11 @@ jobs:
2323 timeout-minutes : 5
2424 steps :
2525 - name : Check out the repository
26- uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
26+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
2727 with :
2828 persist-credentials : false
2929 - name : Set up Node.js 24
30- uses : actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5 .0
30+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0 .0
3131 with :
3232 node-version : 24.x
3333 cache : npm
@@ -70,12 +70,12 @@ jobs:
7070 - 24.x
7171 steps :
7272 - name : Check out the repository
73- uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
73+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
7474 with :
7575 fetch-depth : 0
7676 persist-credentials : false
7777 - name : Set up Node.js ${{ matrix.node-version }}
78- uses : actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5 .0
78+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0 .0
7979 with :
8080 node-version : ${{ matrix.node-version }}
8181 cache : npm
@@ -102,17 +102,80 @@ jobs:
102102 - name : Test packed-package fixtures
103103 run : npm run test:fixtures
104104
105+ artifact-pack :
106+ name : Pack the CI artifact
107+ runs-on : ubuntu-latest
108+ timeout-minutes : 15
109+ outputs :
110+ sha256 : ${{ steps.pack.outputs.sha256 }}
111+ steps :
112+ - name : Check out the repository
113+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
114+ with :
115+ persist-credentials : false
116+ - name : Set up Node.js 24
117+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
118+ with :
119+ node-version : 24.x
120+ cache : npm
121+ - name : Install locked dependencies
122+ run : npm ci
123+ - name : Pack exactly one artifact
124+ id : pack
125+ shell : bash
126+ run : |
127+ set -euo pipefail
128+ mkdir -p ci-artifacts
129+ npm pack --pack-destination ci-artifacts
130+ mapfile -t tarballs < <(find ci-artifacts -maxdepth 1 -type f -name '*.tgz' -print)
131+ if [[ "${#tarballs[@]}" -ne 1 ]]; then
132+ echo "Expected exactly one packed artifact, found ${#tarballs[@]}." >&2
133+ exit 1
134+ fi
135+ echo "sha256=$(sha256sum "${tarballs[0]}" | awk '{ print $1 }')" >> "$GITHUB_OUTPUT"
136+ - name : Upload the packed artifact
137+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
138+ with :
139+ name : ci-npm-package
140+ path : ci-artifacts/*.tgz
141+ if-no-files-found : error
142+
143+ artifact-download :
144+ name : Verify the CI artifact round-trip
145+ needs :
146+ - artifact-pack
147+ runs-on : ubuntu-latest
148+ timeout-minutes : 10
149+ steps :
150+ - name : Download the packed artifact by name
151+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
152+ with :
153+ name : ci-npm-package
154+ path : ci-artifacts
155+ - name : Verify the unique artifact and its digest
156+ env :
157+ EXPECTED_SHA256 : ${{ needs.artifact-pack.outputs.sha256 }}
158+ shell : bash
159+ run : |
160+ set -euo pipefail
161+ mapfile -t tarballs < <(find ci-artifacts -maxdepth 1 -type f -name '*.tgz' -print)
162+ if [[ "${#tarballs[@]}" -ne 1 ]]; then
163+ echo "Expected exactly one downloaded artifact, found ${#tarballs[@]}." >&2
164+ exit 1
165+ fi
166+ echo "$EXPECTED_SHA256 ${tarballs[0]}" | sha256sum --check --strict
167+
105168 minimum-openai :
106169 name : Minimum OpenAI / Node.js 22
107170 runs-on : ubuntu-latest
108171 timeout-minutes : 20
109172 steps :
110173 - name : Check out the repository
111- uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
174+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
112175 with :
113176 persist-credentials : false
114177 - name : Set up Node.js 22
115- uses : actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5 .0
178+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0 .0
116179 with :
117180 node-version : 22.x
118181 cache : npm
@@ -130,11 +193,11 @@ jobs:
130193 timeout-minutes : 20
131194 steps :
132195 - name : Check out the repository
133- uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
196+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
134197 with :
135198 persist-credentials : false
136199 - name : Set up Node.js 24
137- uses : actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5 .0
200+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0 .0
138201 with :
139202 node-version : 24.x
140203 cache : npm
@@ -150,11 +213,11 @@ jobs:
150213 timeout-minutes : 20
151214 steps :
152215 - name : Check out the repository
153- uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
216+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
154217 with :
155218 persist-credentials : false
156219 - name : Set up Node.js 26
157- uses : actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5 .0
220+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0 .0
158221 with :
159222 node-version : 26.x
160223 cache : npm
@@ -177,11 +240,11 @@ jobs:
177240 timeout-minutes : 25
178241 steps :
179242 - name : Check out the repository
180- uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 .0.3
243+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 .0.1
181244 with :
182245 persist-credentials : false
183246 - name : Set up Node.js 24
184- uses : actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5 .0
247+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0 .0
185248 with :
186249 node-version : 24.x
187250 cache : npm
0 commit comments