Skip to content

Commit 2cfab8d

Browse files
authored
Merge pull request #81 from supermemoryai/vorflux/fix-npm-publish
fix: switch to npm trusted publishing (OIDC) and fix yarn publish bug
2 parents 60a34b2 + 9d7c43b commit 2cfab8d

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,22 @@ jobs:
1818
runs-on: ubuntu-latest
1919
permissions:
2020
contents: write
21+
id-token: write
2122

2223
steps:
2324
- uses: actions/checkout@v6
2425

2526
- name: Set up Node
26-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v6
2728
with:
28-
node-version: '20'
29+
node-version: '24'
30+
registry-url: 'https://registry.npmjs.org'
31+
32+
- name: Upgrade npm for trusted publishing support
33+
run: npm install -g npm@latest
34+
35+
- name: Enable corepack
36+
run: corepack enable
2937

3038
- name: Install dependencies
3139
run: |
@@ -41,7 +49,6 @@ jobs:
4149
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
4250
env:
4351
INPUT_PATH: ${{ github.event.inputs.path }}
44-
NPM_TOKEN: ${{ secrets.SUPERMEMORY_NPM_TOKEN || secrets.NPM_TOKEN }}
4552

4653
- name: Upload MCP Server DXT GitHub release asset
4754
run: |

bin/publish-npm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
set -eux
44

5-
npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN"
6-
75
yarn build
86
cd dist
97

@@ -57,5 +55,5 @@ else
5755
TAG="latest"
5856
fi
5957

60-
# Publish with the appropriate tag
61-
yarn publish --tag "$TAG"
58+
# Publish with the appropriate tag using npm trusted publishing (OIDC provenance)
59+
npm publish --tag "$TAG" --provenance

0 commit comments

Comments
 (0)