Skip to content

Commit f6541b1

Browse files
authored
Harden dependency installs (#128)
* Harden dependency installs * Avoid release workflow dependency caches
1 parent 614039d commit f6541b1

4 files changed

Lines changed: 4 additions & 12 deletions

File tree

.github/workflows/ci-monolib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
${{ runner.os }}-
4141
4242
- run: corepack yarn config set enableHardenedMode false
43-
- run: corepack yarn install
43+
- run: corepack yarn install --immutable
4444

4545
- run: corepack yarn check

.github/workflows/release.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ jobs:
4444
echo "npm ${version}"
4545
node -e "const version = process.argv[1]; const [major, minor, patch] = version.split('.').map(Number); if (major < 11 || (major === 11 && (minor < 5 || (minor === 5 && patch < 1)))) { throw new Error('npm 11.5.1 or newer is required for trusted publishing'); }" "$version"
4646
47-
- name: 🏗 Setup Caching
48-
uses: actions/cache@v4
49-
with:
50-
path: |
51-
**/node_modules
52-
.yarn/cache
53-
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
54-
restore-keys: |
55-
${{ runner.os }}-
56-
5747
# Allow yarn to make changes during release
5848
- run: corepack yarn config set enableHardenedMode false
5949
- run: corepack yarn --mode=update-lockfile

.yarnrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ enableGlobalCache: true
33
nodeLinker: node-modules
44

55
npmRegistryServer: "https://registry.npmjs.org"
6+
7+
npmMinimalAgeGate: 2880

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"npm-run-all": "^4.1.5",
3636
"typescript": "^5.9.3"
3737
},
38-
"packageManager": "yarn@4.9.4",
38+
"packageManager": "yarn@4.12.0",
3939
"engines": {
4040
"node": ">= 18",
4141
"yarn": "4.2.1"

0 commit comments

Comments
 (0)