Skip to content

Commit f7c3101

Browse files
authored
Chore/release packages (#1201)
* chore: update npm publishing workflow and package metadata - Added `id-token` permission for OIDC support in GitHub Actions. - Updated npm to the latest version and verified the installation in the release workflow. - Changed package metadata URLs for all SDK packages to point to the new repository location. - Updated the repository URL in the root package.json for consistency. * chore(packages): add release changeset - add release changeset
1 parent 90679ea commit f7c3101

File tree

9 files changed

+43
-23
lines changed

9 files changed

+43
-23
lines changed

.changeset/gentle-zoos-juggle.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@commercetools/checkout-sdk': minor
3+
'@commercetools/history-sdk': minor
4+
'@commercetools/importapi-sdk': minor
5+
'@commercetools/platform-sdk': minor
6+
'@commercetools/sdk-client-v2': minor
7+
'@commercetools/ts-client': minor
8+
'@commercetools/ts-sdk-apm': minor
9+
---
10+
11+
release packages

.github/workflows/release.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
permissions:
99
actions: write
1010
contents: write
11+
id-token: write # Required for npm trusted publishing (OIDC)
1112

1213
jobs:
1314
release:
@@ -41,21 +42,25 @@ jobs:
4142
- name: Setup
4243
uses: ./.github/actions/ci
4344

44-
- name: Creating .npmrc
45-
run: |
46-
cat << EOF > "$HOME/.npmrc"
47-
email=npmjs@commercetools.com
48-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
49-
EOF
50-
env:
51-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45+
# Ensure npm 11.5.1 or later is installed for OIDC support
46+
- name: Update npm
47+
run: npm install -g npm@latest
48+
49+
- name: Verify npm version
50+
run: npm --version
51+
52+
- name: Setup Node.js for npm publishing
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '22'
56+
registry-url: 'https://registry.npmjs.org'
5257

5358
- name: Building packages
5459
run: yarn build
5560

5661
- name: Create Release Pull Request or Publish to npm
5762
id: changesets
58-
uses: changesets/action@master
63+
uses: changesets/action@v1
5964
with:
6065
publish: yarn changeset publish
6166
version: yarn changeset:version-and-format

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
"docs": "rm -rf docs;typedoc"
2020
},
2121
"workspaces": ["packages/*"],
22+
"repository": {
23+
"type": "git",
24+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
25+
},
2226
"lint-staged": {
2327
"*.{js,json,md}": ["prettier --write"],
2428
"*.ts": ["prettier --write", "tsc-files --noEmit"]

packages/checkout-sdk/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
"sdk",
1717
"checkout"
1818
],
19-
"homepage": "https://github.com/commercetools/commercetools-typescript-sdks/packages/checkout-sdk",
20-
"bugs": "https://github.com/commercetools/commercetools-typescript-sdks/issues",
19+
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript/packages/checkout-sdk",
20+
"bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/commercetools/commercetools-typescript-sdks.git"
23+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
2424
},
2525
"files": ["dist", "CHANGELOG.md"],
2626
"author": "Ajima Chukwuemeka",

packages/history-sdk/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
"sdk",
1717
"history"
1818
],
19-
"homepage": "https://github.com/commercetools/commercetools-typescript-sdks/packages/history-sdk",
20-
"bugs": "https://github.com/commercetools/commercetools-typescript-sdks/issues",
19+
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript/packages/history-sdk",
20+
"bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/commercetools/commercetools-typescript-sdks.git"
23+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
2424
},
2525
"files": ["dist", "CHANGELOG.md"],
2626
"author": "Jens Schulze",

packages/platform-sdk/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
},
1111
"description": "TypeScript definitions and SDK for commercetools Composable Commerce",
1212
"keywords": ["commercetools", "composable commerce", "typescript", "sdk"],
13-
"homepage": "https://github.com/commercetools/commercetools-typescript-sdks",
14-
"bugs": "https://github.com/commercetools/commercetools-typescript-sdks/issues",
13+
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript",
14+
"bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
1515
"repository": {
1616
"type": "git",
17-
"url": "https://github.com/commercetools/commercetools-typescript-sdks.git"
17+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
1818
},
1919
"files": ["dist", "CHANGELOG.md"],
2020
"author": "Achraf Beniasaad",

packages/sdk-client-v3/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"repository": {
2929
"type": "git",
30-
"url": "git+https://github.com/commercetools/commercetools-sdk-typescript.git"
30+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
3131
},
3232
"bugs": {
3333
"url": "https://github.com/commercetools/commercetools-sdk-typescript/issues"

packages/sdk-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"repository": {
2929
"type": "git",
30-
"url": "git+https://github.com/commercetools/commercetools-sdk-typescript.git"
30+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
3131
},
3232
"bugs": {
3333
"url": "https://github.com/commercetools/commercetools-sdk-typescript/issues"

packages/ts-sdk-apm/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"opentelemetry",
3333
"tracing"
3434
],
35-
"homepage": "https://github.com/commercetools/commercetools-typescript-sdks",
36-
"bugs": "https://github.com/commercetools/commercetools-typescript-sdks/issues",
35+
"homepage": "https://github.com/commercetools/commercetools-sdk-typescript",
36+
"bugs": "https://github.com/commercetools/commercetools-sdk-typescript/issues",
3737
"repository": {
3838
"type": "git",
39-
"url": "https://github.com/commercetools/commercetools-typescript-sdks.git"
39+
"url": "https://github.com/commercetools/commercetools-sdk-typescript.git"
4040
},
4141
"files": [
4242
"dist",

0 commit comments

Comments
 (0)