Skip to content
Merged
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
61 changes: 61 additions & 0 deletions .github/workflows/release-production-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release CLI Core (Production)

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.28.0
- uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Enable Corepack
run: corepack enable

- name: Install pnpm
run: corepack prepare pnpm@10.28.0 --activate

- name: Clean the repository
run: pnpm run clean:all

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

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

- name: Reading Configuration
id: release_config
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: .github/config/release.json
prefix: release

- name: Publishing core (Production)
id: publish-core
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack/package.json
tag: latest

- name: Create Core Production Release
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.publish-core.outputs.version }}
run: |
TAG="core@v${VERSION}"
if gh release view "$TAG" &>/dev/null; then
echo "Release $TAG already exists — skipping."
else
gh release create "$TAG" \
--title "Core Production $VERSION" \
--generate-notes
fi
16 changes: 16 additions & 0 deletions .github/workflows/release-production-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CLI Production Release Pipeline

on:
push:
branches: [main]
workflow_dispatch:

jobs:
plugins:
uses: ./.github/workflows/release-production-platform-plugins.yml
secrets: inherit

core:
needs: plugins
uses: ./.github/workflows/release-production-core.yml
secrets: inherit
70 changes: 70 additions & 0 deletions .github/workflows/release-production-platform-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release CLI Platform Plugins (Production)

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.28.0
- uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Enable Corepack
run: corepack enable

- name: Install pnpm
run: corepack prepare pnpm@10.28.0 --activate

- name: Clean the repository
run: pnpm run clean:all

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

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

- name: Reading Configuration
id: release_config
uses: rgarcia-phi/json-to-variables@v1.1.0
with:
filename: .github/config/release.json
prefix: release

# Utilities
- name: Publishing utilities (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-utilities/package.json
tag: latest

# Command
- name: Publishing command (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-command/package.json
tag: latest

# Config
- name: Publishing config (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-config/package.json
tag: latest

# Auth
- name: Publishing auth (Production)
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./packages/contentstack-auth/package.json
tag: latest
2 changes: 2 additions & 0 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ fileignoreconfig:
- filename: pnpm-lock.yaml
checksum: 17d63745bf9d45e29848c2c512c31d7aab42c5aeb986996adf049905a31c7322
version: '1.0'
- filename: .github/workflows/release-production-pipeline.yml
checksum: dd858a2c2a3297c5651c2843ddae73ad0776a0386329200d01b051ddc489871e
Loading