Skip to content

Commit b6ad6f9

Browse files
authored
chore: force specific npm for publishing (#1627)
* chore: force specific npm for publishing Signed-off-by: Tomas Weiss <[email protected]> * chore: add explanation of custom npm installation Signed-off-by: Tomas Weiss <[email protected]> --------- Signed-off-by: Tomas Weiss <[email protected]>
1 parent a592f56 commit b6ad6f9

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ jobs:
8787
run: |
8888
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
8989
echo "latestTag=$([[ ${GITHUB_REF#refs/tags/v} =~ [a-zA-Z] ]] && echo prerelease || echo latest)" >> $GITHUB_OUTPUT
90+
VERSION="${GITHUB_REF#refs/tags/v}"
91+
if [[ "$VERSION" =~ [Rr][Cc] ]]; then
92+
echo "npmTag=rc" >> $GITHUB_OUTPUT
93+
else
94+
echo "npmTag=latest" >> $GITHUB_OUTPUT
95+
fi
9096
- uses: ./.github/actions/setup
9197
env:
9298
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -152,10 +158,6 @@ jobs:
152158
with:
153159
packages-dir: apps/agentstack-cli/dist
154160

155-
- name: Update npm
156-
working-directory: apps/agentstack-sdk-ts
157-
run: npm install -g npm@latest
158-
159161
- name: Publish TS SDK
160162
working-directory: apps/agentstack-sdk-ts
161-
run: npm publish --tag rc
163+
run: npm publish --tag ${{ steps.version.outputs.npmTag }}

mise.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ raw = true
2828
node.gpg_verify = false # tends to randomly fail; sha is checked by lockfile
2929

3030
[hooks]
31-
postinstall = "{{ mise_bin }} setup"
31+
postinstall = [
32+
"{{ mise_bin }} setup",
33+
34+
# npm 11.5+ is needed for trusted publishing
35+
# we can safely remove this after we migrate to node >= 24.5
36+
37+
"npm install -g [email protected]"
38+
]
3239

3340
[env]
3441
UV_PYTHON_PREFERENCE = "only-managed"

0 commit comments

Comments
 (0)