Skip to content

Commit d2800a0

Browse files
committed
ci: pin release workflow actions to commit SHAs
Every third-party and GitHub-owned action in the release workflow was pinned to a mutable tag, so a retagged release could change what runs on a job that holds contents:write, id-token:write and the npm publishing identity. Pin all sixteen references to full commit SHAs with the version in an adjacent comment, matching the convention already used in desktop-release.yml.
1 parent 5b2e1b8 commit d2800a0

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ jobs:
6161
id-token: write # Required for NPM Trusted Publishing (OIDC)
6262
steps:
6363
- name: Checkout
64-
uses: actions/checkout@v6
64+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
6565
with:
6666
fetch-depth: 0
6767

6868
- name: Setup pnpm
69-
uses: pnpm/action-setup@v6
69+
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # pinned from v6
7070

7171
- name: Setup Node.js
72-
uses: actions/setup-node@v6
72+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
7373
with:
7474
node-version-file: .nvmrc
7575
cache: "pnpm"
@@ -93,14 +93,14 @@ jobs:
9393

9494
- name: Mint release-bot token
9595
id: release-bot
96-
uses: actions/create-github-app-token@v2
96+
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # pinned from v2
9797
with:
9898
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
9999
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
100100

101101
- name: Create Release Pull Request or Publish to npm
102102
id: changesets
103-
uses: changesets/action@v1
103+
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # pinned from v1
104104
with:
105105
publish: node scripts/release/changeset-publish-idempotent.mjs
106106
version: pnpm run version:release
@@ -142,13 +142,13 @@ jobs:
142142
runs-on: ubuntu-latest
143143
steps:
144144
- name: Checkout
145-
uses: actions/checkout@v6
145+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
146146

147147
- name: Setup pnpm
148-
uses: pnpm/action-setup@v6
148+
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # pinned from v6
149149

150150
- name: Setup Node.js
151-
uses: actions/setup-node@v6
151+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
152152
with:
153153
node-version-file: .nvmrc
154154
cache: "pnpm"
@@ -196,7 +196,7 @@ jobs:
196196
197197
- name: Upload VSIX artifacts
198198
if: always()
199-
uses: actions/upload-artifact@v7
199+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned from v7
200200
with:
201201
name: pythinker-code-vsix
202202
path: apps/vscode/artifacts/vsix/*.vsix
@@ -296,12 +296,12 @@ jobs:
296296
runs-on: ubuntu-latest
297297
steps:
298298
- name: Checkout
299-
uses: actions/checkout@v6
299+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
300300
with:
301301
fetch-depth: 0
302302

303303
- name: Setup Node.js
304-
uses: actions/setup-node@v6
304+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
305305
with:
306306
node-version-file: .nvmrc
307307

@@ -318,10 +318,10 @@ jobs:
318318
runs-on: ubuntu-latest
319319
steps:
320320
- name: Checkout
321-
uses: actions/checkout@v6
321+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
322322

323323
- name: Setup Node.js
324-
uses: actions/setup-node@v6
324+
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # pinned from v6
325325
with:
326326
node-version-file: .nvmrc
327327

@@ -330,7 +330,7 @@ jobs:
330330
# Cloning and pushing the tap needs contents and nothing else.
331331
- name: Mint tap token
332332
id: tap-token
333-
uses: actions/create-github-app-token@v2
333+
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # pinned from v2
334334
with:
335335
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
336336
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
@@ -388,10 +388,10 @@ jobs:
388388

389389
steps:
390390
- name: Checkout
391-
uses: actions/checkout@v6
391+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2
392392

393393
- name: Download native artifacts
394-
uses: actions/download-artifact@v8
394+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # pinned from v8
395395
with:
396396
pattern: pythinker-code-native-*
397397
path: dist-native-release

0 commit comments

Comments
 (0)