Skip to content

Commit 6c7cfc2

Browse files
authored
Merge pull request #174 from lambda-curry/changeset-release/main
2 parents c246a47 + 39b867b commit 6c7cfc2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ jobs:
2626
registry-url: 'https://registry.npmjs.org'
2727
# registry-url enables OIDC authentication for npm publish
2828

29+
- name: Install npm 11.5.1+ for trusted publishing
30+
run: npm install -g npm@latest
31+
# Trusted publishing requires npm CLI 11.5.1 or later
32+
2933
- name: Enable Corepack
3034
run: corepack enable
3135

@@ -45,6 +49,14 @@ jobs:
4549
else
4650
echo "⚠ OIDC environment not detected"
4751
fi
52+
# Verify npm version meets trusted publishing requirement (11.5.1+)
53+
NPM_VERSION=$(npm --version | cut -d. -f1,2)
54+
REQUIRED_VERSION="11.5"
55+
if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$NPM_VERSION" | sort -V | head -n1)" = "$REQUIRED_VERSION" ]; then
56+
echo "✓ npm version meets trusted publishing requirement (11.5.1+)"
57+
else
58+
echo "⚠ npm version may be too old for trusted publishing (requires 11.5.1+)"
59+
fi
4860
4961
- name: Create Release Pull Request or Publish to npm
5062
id: changesets

0 commit comments

Comments
 (0)