Skip to content

Commit 1281c3f

Browse files
Merge pull request #5 from contentstack/v1-beta
V1 beta
2 parents de4f480 + a33fce9 commit 1281c3f

File tree

958 files changed

+174709
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

958 files changed

+174709
-1
lines changed

.github/config/release.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"releaseAll": true,
3+
"plugins": {
4+
"utilities": false,
5+
"command": false,
6+
"config": false,
7+
"auth": false,
8+
"export": false,
9+
"import": false,
10+
"clone": false,
11+
"export-to-csv": false,
12+
"migrate-rte": false,
13+
"migration": false,
14+
"seed": false,
15+
"bootstrap": false,
16+
"bulk-publish": false,
17+
"dev-dependencies": false,
18+
"launch": false,
19+
"branches": false,
20+
"core": false
21+
}
22+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
pull_request:
16+
# The branches below must be a subset of the branches above
17+
branches: '*'
18+
19+
jobs:
20+
analyze:
21+
name: Analyze
22+
runs-on: ubuntu-latest
23+
permissions:
24+
actions: read
25+
contents: read
26+
security-events: write
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'javascript' ]
32+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
33+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v3.5.3
38+
39+
# Initializes the CodeQL tools for scanning.
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v2
42+
with:
43+
languages: ${{ matrix.language }}
44+
# If you wish to specify custom queries, you can do so here or in a config file.
45+
# By default, queries listed here will override any specified in a config file.
46+
# Prefix the list here with "+" to use these queries and those in the config file.
47+
48+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
49+
# queries: security-extended,security-and-quality
50+
51+
52+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53+
# If this step fails, then you should remove it and run the build manually (see below)
54+
- name: Autobuild
55+
uses: github/codeql-action/autobuild@v2
56+
57+
# ℹ️ Command-line programs to run using the OS shell.
58+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
59+
60+
# If the Autobuild fails above, remove it and uncomment the following three lines.
61+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
62+
63+
# - run: |
64+
# echo "Run, Build Application using script"
65+
# ./location_of_script_within_repo/buildscript.sh
66+
67+
- name: Perform CodeQL Analysis
68+
uses: github/codeql-action/analyze@v2

.github/workflows/policy-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
if [ "$license_file_found" = false ]; then
4444
echo "No license file found. Please add a license file to the repository."
4545
exit 1
46-
fi
46+
fi
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
name: Release CLI Plugins (v1 Beta)
2+
3+
on:
4+
push:
5+
branches: [disable-v1-beta]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
with:
14+
version: 10.28.0
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
19+
- name: Enable Corepack
20+
run: corepack enable
21+
22+
- name: Install pnpm
23+
run: corepack prepare pnpm@10.28.0 --activate
24+
25+
- name: Install root dependencies
26+
run: pnpm install
27+
28+
- name: Reading Configuration
29+
id: release_config
30+
uses: rgarcia-phi/json-to-variables@v1.1.0
31+
with:
32+
filename: .github/config/release.json
33+
prefix: release
34+
35+
# Variants
36+
- name: Installing dependencies of variants
37+
id: variants-installation
38+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}}
39+
working-directory: ./packages/contentstack-variants
40+
run: npm install
41+
- name: Compiling variants
42+
if: ${{ steps.variants-installation.conclusion == 'success' }}
43+
working-directory: ./packages/contentstack-variants
44+
run: npm run prepack
45+
- name: Publishing variants (Beta)
46+
uses: JS-DevTools/npm-publish@v3
47+
if: ${{ steps.variants-installation.conclusion == 'success' }}
48+
with:
49+
token: ${{ secrets.NPM_TOKEN }}
50+
package: ./packages/contentstack-variants/package.json
51+
access: public
52+
tag: beta
53+
54+
# Export
55+
- name: Installing dependencies of export
56+
id: export-installation
57+
if: ${{ env.release_releaseAll == 'true' || env.release_plugins_export == 'true'}}
58+
working-directory: ./packages/contentstack-export
59+
run: npm install
60+
- name: Compiling export
61+
if: ${{ steps.export-installation.conclusion == 'success' }}
62+
working-directory: ./packages/contentstack-export
63+
run: npm run prepack
64+
- name: Publishing export (Beta)
65+
uses: JS-DevTools/npm-publish@v3
66+
if: ${{ steps.export-installation.conclusion == 'success' }}
67+
with:
68+
token: ${{ secrets.NPM_TOKEN }}
69+
package: ./packages/contentstack-export/package.json
70+
tag: beta
71+
72+
# Audit
73+
- name: Installing dependencies of audit
74+
id: audit-installation
75+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_audit == 'true'}}
76+
working-directory: ./packages/contentstack-audit
77+
run: npm install
78+
- name: Compiling audit
79+
if: ${{ steps.audit-installation.conclusion == 'success' }}
80+
working-directory: ./packages/contentstack-audit
81+
run: npm run prepack
82+
- name: Publishing audit (Beta)
83+
uses: JS-DevTools/npm-publish@v3
84+
if: ${{ steps.audit-installation.conclusion == 'success' }}
85+
with:
86+
token: ${{ secrets.NPM_TOKEN }}
87+
package: ./packages/contentstack-audit/package.json
88+
access: public
89+
tag: beta
90+
91+
# Import
92+
- name: Installing dependencies of import
93+
id: import-installation
94+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_import == 'true'}}
95+
working-directory: ./packages/contentstack-import
96+
run: npm install
97+
- name: Compiling import
98+
if: ${{ steps.import-installation.conclusion == 'success' }}
99+
working-directory: ./packages/contentstack-import
100+
run: npm run prepack
101+
- name: Publishing import (Beta)
102+
uses: JS-DevTools/npm-publish@v3
103+
if: ${{ steps.import-installation.conclusion == 'success' }}
104+
with:
105+
token: ${{ secrets.NPM_TOKEN }}
106+
package: ./packages/contentstack-import/package.json
107+
tag: beta
108+
109+
# Clone
110+
- name: Installing dependencies of clone
111+
id: clone-installation
112+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_clone == 'true'}}
113+
working-directory: ./packages/contentstack-clone
114+
run: npm install
115+
- name: Publishing clone (Beta)
116+
uses: JS-DevTools/npm-publish@v3
117+
if: ${{ steps.clone-installation.conclusion == 'success' }}
118+
with:
119+
token: ${{ secrets.NPM_TOKEN }}
120+
package: ./packages/contentstack-clone/package.json
121+
tag: beta
122+
123+
# Import Setup
124+
- name: Installing dependencies of import-setup
125+
id: import-setup-installation
126+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_import_setup == 'true'}}
127+
working-directory: ./packages/contentstack-import-setup
128+
run: npm install
129+
- name: Compiling import-setup
130+
if: ${{ steps.import-setup-installation.conclusion == 'success' }}
131+
working-directory: ./packages/contentstack-import-setup
132+
run: npm run prepack
133+
- name: Publishing import-setup (Beta)
134+
uses: JS-DevTools/npm-publish@v3
135+
if: ${{ steps.import-setup-installation.conclusion == 'success' }}
136+
with:
137+
token: ${{ secrets.NPM_TOKEN }}
138+
package: ./packages/contentstack-import-setup/package.json
139+
access: public
140+
tag: beta
141+
142+
# Export to CSV
143+
- name: Installing dependencies of export to csv
144+
id: export-to-csv-installation
145+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}}
146+
working-directory: ./packages/contentstack-export-to-csv
147+
run: npm install
148+
- name: Publishing export to csv (Beta)
149+
uses: JS-DevTools/npm-publish@v3
150+
if: ${{ steps.export-to-csv-installation.conclusion == 'success' }}
151+
with:
152+
token: ${{ secrets.NPM_TOKEN }}
153+
package: ./packages/contentstack-export-to-csv/package.json
154+
tag: beta
155+
156+
# Migration
157+
- name: Installing dependencies of migration
158+
id: migration-installation
159+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_migration == 'true'}}
160+
working-directory: ./packages/contentstack-migration
161+
run: npm install
162+
- name: Publishing migration (Beta)
163+
uses: JS-DevTools/npm-publish@v3
164+
if: ${{ steps.migration-installation.conclusion == 'success' }}
165+
with:
166+
token: ${{ secrets.NPM_TOKEN }}
167+
package: ./packages/contentstack-migration/package.json
168+
tag: beta
169+
170+
# Seed
171+
- name: Installing dependencies of seed
172+
id: seed-installation
173+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_seed == 'true'}}
174+
working-directory: ./packages/contentstack-seed
175+
run: npm install
176+
- name: Compiling seed
177+
if: ${{ steps.seed-installation.conclusion == 'success' }}
178+
working-directory: ./packages/contentstack-seed
179+
run: npm run prepack
180+
- name: Publishing seed (Beta)
181+
uses: JS-DevTools/npm-publish@v3
182+
if: ${{ steps.seed-installation.conclusion == 'success' }}
183+
with:
184+
token: ${{ secrets.NPM_TOKEN }}
185+
package: ./packages/contentstack-seed/package.json
186+
tag: beta
187+
188+
# Bootstrap
189+
- name: Installing dependencies of bootstrap
190+
id: bootstrap-installation
191+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_bootstrap == 'true'}}
192+
working-directory: ./packages/contentstack-bootstrap
193+
run: npm install
194+
- name: Compiling bootstrap
195+
if: ${{ steps.bootstrap-installation.conclusion == 'success' }}
196+
working-directory: ./packages/contentstack-bootstrap
197+
run: npm run prepack
198+
- name: Publishing bootstrap (Beta)
199+
uses: JS-DevTools/npm-publish@v3
200+
if: ${{ steps.bootstrap-installation.conclusion == 'success' }}
201+
with:
202+
token: ${{ secrets.NPM_TOKEN }}
203+
package: ./packages/contentstack-bootstrap/package.json
204+
tag: beta
205+
206+
# Bulk Publish
207+
- name: Installing dependencies of bulk publish
208+
id: bulk-publish-installation
209+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_bulk-publish == 'true'}}
210+
working-directory: ./packages/contentstack-bulk-publish
211+
run: npm install
212+
- name: Publishing bulk publish (Beta)
213+
uses: JS-DevTools/npm-publish@v3
214+
if: ${{ steps.bulk-publish-installation.conclusion == 'success' }}
215+
with:
216+
token: ${{ secrets.NPM_TOKEN }}
217+
package: ./packages/contentstack-bulk-publish/package.json
218+
tag: beta
219+
220+
# Branches
221+
- name: Installing dependencies of branches
222+
id: branches-installation
223+
if: ${{env.release_releaseAll == 'true' || env.release_plugins_branches == 'true'}}
224+
working-directory: ./packages/contentstack-branches
225+
run: npm install
226+
- name: Compiling branches
227+
if: ${{ steps.branches-installation.conclusion == 'success' }}
228+
working-directory: ./packages/contentstack-branches
229+
run: npm run prepack
230+
- name: Publishing branches (Beta)
231+
uses: JS-DevTools/npm-publish@v3
232+
if: ${{ steps.branches-installation.conclusion == 'success' }}
233+
with:
234+
token: ${{ secrets.NPM_TOKEN }}
235+
package: ./packages/contentstack-branches/package.json
236+
access: public
237+
tag: beta
238+
239+
- name: Create Beta Release
240+
if: ${{ steps.publish-core.conclusion == 'success' }}
241+
id: create_release
242+
env:
243+
GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }}
244+
VERSION: ${{ steps.publish-core.outputs.version }}
245+
run: |
246+
# Get the previous beta release for comparison
247+
PREVIOUS_BETA=$(gh release list --limit 10 | grep 'beta' | head -1 | cut -f1)
248+
249+
if [ -n "$PREVIOUS_BETA" ]; then
250+
gh release create v"$VERSION" --title "Beta Release $VERSION" --notes-from-tag "$PREVIOUS_BETA" --prerelease
251+
else
252+
gh release create v"$VERSION" --title "Beta Release $VERSION" --generate-notes --prerelease
253+
fi

0 commit comments

Comments
 (0)