Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/config/release.json

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/release-v1-legacy-core.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/release-v1-legacy-platform-plugins.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/release-v1-legacy.yml

This file was deleted.

85 changes: 85 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Publish packages to npmjs registry

on:
release:
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}
persist-credentials: false
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
version: 10.28.0
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build all packages
run: pnpm -r --sort run build

- name: Update npm
run: npm install -g npm@latest

# Each step publishes its package unless that version is already on npm.
- name: Publish utilities
working-directory: packages/contentstack-utilities
run: |
name=$(jq -r .name package.json); version=$(jq -r .version package.json)
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "skip $name@$version (already on npm)"
else
npm publish --access public --tag v1-x
fi

- name: Publish command
working-directory: packages/contentstack-command
run: |
name=$(jq -r .name package.json); version=$(jq -r .version package.json)
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "skip $name@$version (already on npm)"
else
npm publish --access public --tag v1-x
fi

- name: Publish config
working-directory: packages/contentstack-config
run: |
name=$(jq -r .name package.json); version=$(jq -r .version package.json)
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "skip $name@$version (already on npm)"
else
npm publish --access public --tag v1-x
fi

- name: Publish auth
working-directory: packages/contentstack-auth
run: |
name=$(jq -r .name package.json); version=$(jq -r .version package.json)
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "skip $name@$version (already on npm)"
else
npm publish --access public --tag v1-x
fi

- name: Publish core
working-directory: packages/contentstack
run: |
name=$(jq -r .name package.json); version=$(jq -r .version package.json)
if npm view "$name@$version" version >/dev/null 2>&1; then
echo "skip $name@$version (already on npm)"
else
npm publish --access public --tag v1-x
fi
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ fileignoreconfig:
ignore_detectors:
- filecontent
- base64content
- filename: .github/workflows/release.yml
checksum: e609a80736cd222cd6c25e06af85aed19d7461c367b2ff099fe899aef9475041
version: '1.0'
6 changes: 5 additions & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@
"auth:tokens:remove": "RMVTKN"
}
},
"repository": "contentstack/cli"
"repository": {
"type": "git",
"url": "git+https://github.com/contentstack/cli.git",
"directory": "packages/contentstack-auth"
}
}
6 changes: 5 additions & 1 deletion packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,9 @@
"bin": "csdx",
"repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-command/<%- commandPath %>"
},
"repository": "contentstack/cli"
"repository": {
"type": "git",
"url": "git+https://github.com/contentstack/cli.git",
"directory": "packages/contentstack-command"
}
}
6 changes: 5 additions & 1 deletion packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,9 @@
"config:remove:rate-limit": "RLRM"
}
},
"repository": "contentstack/cli"
"repository": {
"type": "git",
"url": "git+https://github.com/contentstack/cli.git",
"directory": "packages/contentstack-config"
}
}
3 changes: 2 additions & 1 deletion packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"repository": {
"type": "git",
"url": ""
"url": "git+https://github.com/contentstack/cli.git",
"directory": "packages/contentstack-utilities"
},
"keywords": [
"contentstack",
Expand Down
6 changes: 5 additions & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,9 @@
]
}
},
"repository": "https://github.com/contentstack/cli"
"repository": {
"type": "git",
"url": "git+https://github.com/contentstack/cli.git",
"directory": "packages/contentstack"
}
}
Loading
Loading