Skip to content

Commit 03f8d03

Browse files
cs-rajclaude
andcommitted
feat: add v2 production release workflows
Port production release workflows from development branch for v2 GA: - release-production-pipeline.yml: triggers on main + workflow_dispatch - release-production-core.yml: tag:latest, non-prerelease GitHub release - release-production-platform-plugins.yml: utilities/command/config/auth with tag:latest Also adds .talismanrc exception for secrets:inherit false positive in the pipeline workflow. Closes DX-10156 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0404d3d commit 03f8d03

4 files changed

Lines changed: 149 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release CLI Core (Production)
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: pnpm/action-setup@v4
12+
with:
13+
version: 10.28.0
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22.x'
17+
18+
- name: Enable Corepack
19+
run: corepack enable
20+
21+
- name: Install pnpm
22+
run: corepack prepare pnpm@10.28.0 --activate
23+
24+
- name: Clean the repository
25+
run: pnpm run clean:all
26+
27+
- name: Install root dependencies
28+
run: pnpm install --no-frozen-lockfile
29+
30+
- name: Build all packages
31+
run: pnpm -r --sort run build
32+
33+
- name: Reading Configuration
34+
id: release_config
35+
uses: rgarcia-phi/json-to-variables@v1.1.0
36+
with:
37+
filename: .github/config/release.json
38+
prefix: release
39+
40+
- name: Publishing core (Production)
41+
id: publish-core
42+
uses: JS-DevTools/npm-publish@v3
43+
with:
44+
token: ${{ secrets.NPM_TOKEN }}
45+
package: ./packages/contentstack/package.json
46+
tag: latest
47+
48+
- name: Create Core Production Release
49+
id: create_release
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
VERSION: ${{ steps.publish-core.outputs.version }}
53+
run: |
54+
TAG="core@v${VERSION}"
55+
if gh release view "$TAG" &>/dev/null; then
56+
echo "Release $TAG already exists — skipping."
57+
else
58+
gh release create "$TAG" \
59+
--title "Core Production $VERSION" \
60+
--generate-notes
61+
fi
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CLI Production Release Pipeline
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
plugins:
10+
uses: ./.github/workflows/release-production-platform-plugins.yml
11+
secrets: inherit
12+
13+
core:
14+
needs: plugins
15+
uses: ./.github/workflows/release-production-core.yml
16+
secrets: inherit
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Release CLI Platform Plugins (Production)
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: pnpm/action-setup@v4
12+
with:
13+
version: 10.28.0
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: '22.x'
17+
18+
- name: Enable Corepack
19+
run: corepack enable
20+
21+
- name: Install pnpm
22+
run: corepack prepare pnpm@10.28.0 --activate
23+
24+
- name: Clean the repository
25+
run: pnpm run clean:all
26+
27+
- name: Install root dependencies
28+
run: pnpm install --no-frozen-lockfile
29+
30+
- name: Build all plugins
31+
run: pnpm -r --sort run build
32+
33+
- name: Reading Configuration
34+
id: release_config
35+
uses: rgarcia-phi/json-to-variables@v1.1.0
36+
with:
37+
filename: .github/config/release.json
38+
prefix: release
39+
40+
# Utilities
41+
- name: Publishing utilities (Production)
42+
uses: JS-DevTools/npm-publish@v3
43+
with:
44+
token: ${{ secrets.NPM_TOKEN }}
45+
package: ./packages/contentstack-utilities/package.json
46+
tag: latest
47+
48+
# Command
49+
- name: Publishing command (Production)
50+
uses: JS-DevTools/npm-publish@v3
51+
with:
52+
token: ${{ secrets.NPM_TOKEN }}
53+
package: ./packages/contentstack-command/package.json
54+
tag: latest
55+
56+
# Config
57+
- name: Publishing config (Production)
58+
uses: JS-DevTools/npm-publish@v3
59+
with:
60+
token: ${{ secrets.NPM_TOKEN }}
61+
package: ./packages/contentstack-config/package.json
62+
tag: latest
63+
64+
# Auth
65+
- name: Publishing auth (Production)
66+
uses: JS-DevTools/npm-publish@v3
67+
with:
68+
token: ${{ secrets.NPM_TOKEN }}
69+
package: ./packages/contentstack-auth/package.json
70+
tag: latest

.talismanrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ fileignoreconfig:
33
- filename: pnpm-lock.yaml
44
checksum: 17d63745bf9d45e29848c2c512c31d7aab42c5aeb986996adf049905a31c7322
55
version: '1.0'
6+
- filename: .github/workflows/release-production-pipeline.yml
7+
checksum: dd858a2c2a3297c5651c2843ddae73ad0776a0386329200d01b051ddc489871e

0 commit comments

Comments
 (0)