diff --git a/public/scripts/packages/cs/package.json b/public/scripts/packages/cs/package.json index 35e8324b07fb8..17d12b191a720 100644 --- a/public/scripts/packages/cs/package.json +++ b/public/scripts/packages/cs/package.json @@ -3,13 +3,15 @@ "type": "module", "version": "0.1.0", "scripts": { - "build": "node build.js" + "build": "node build.js", + "publish": "npm publish --registry=https://registry.npmjs.org" }, "dependencies": { "esbuild": "^0.24.0", "glob": "^11.0.0" }, "devDependencies": { - "@semantic-release/changelog": "^6.0.3" + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/exec": "^6.0.3" } } diff --git a/public/scripts/packages/cs/release.config.mjs b/public/scripts/packages/cs/release.config.mjs index 8e874a370241b..7e9328ab6ce72 100644 --- a/public/scripts/packages/cs/release.config.mjs +++ b/public/scripts/packages/cs/release.config.mjs @@ -10,7 +10,7 @@ module.exports = { { name: "beta", prerelease: true }, { name: "alpha", prerelease: true }, ], - repositoryUrl: "git@github.com:deriv-com/cs-scripts.git", + repositoryUrl: "git@github.com:deriv-com/deriv-static-content.git", plugins: [ [ "@semantic-release/commit-analyzer", @@ -66,6 +66,13 @@ module.exports = { }, ], "@semantic-release/changelog", + [ + "@semantic-release/exec", + { + prepareCmd: "cd public/scripts/packages/cs && npm run build", + publishCmd: "cd public/scripts/packages/cs && npm run publish", + }, + ], [ "@semantic-release/npm", { diff --git a/public/scripts/packages/marketing/package.json b/public/scripts/packages/marketing/package.json index d2e0469fc36f5..a7713d146e425 100644 --- a/public/scripts/packages/marketing/package.json +++ b/public/scripts/packages/marketing/package.json @@ -3,13 +3,15 @@ "version": "0.1.0", "type": "module", "scripts": { - "build": "node build.js" + "build": "node build.js", + "publish": "npm publish --registry=https://registry.npmjs.org" }, "dependencies": { "esbuild": "^0.24.0", "glob": "^11.0.0" }, "devDependencies": { - "@semantic-release/changelog": "^6.0.3" + "@semantic-release/changelog": "^6.0.3", + "@semantic-release/exec": "^6.0.3" } } diff --git a/public/scripts/packages/marketing/release.config.mjs b/public/scripts/packages/marketing/release.config.mjs index 3f8f87eb7398d..3c4ed0791447e 100644 --- a/public/scripts/packages/marketing/release.config.mjs +++ b/public/scripts/packages/marketing/release.config.mjs @@ -1,77 +1,84 @@ /* eslint-disable @typescript-eslint/no-var-requires */ -import customTransform from "../cs/release.utils.mjs" +import customTransform from "../cs/release.utils.mjs"; -export default { - branches: [ - "+([0-9])?(.{+([0-9]),x}).x", - "master", - "next", - "next-major", - { name: "beta", prerelease: true }, - { name: "alpha", prerelease: true }, - ], - repositoryUrl: "git@github.com:deriv-com/marketing-scripts.git", - plugins: [ - [ - "@semantic-release/commit-analyzer", - { - releaseRules: [ - { - type: "feat", - release: "minor", - }, - { - type: "build", - release: "patch", - }, - { - type: "ci", - release: "patch", - }, - { - type: "chore", - release: "patch", - }, - { - type: "docs", - release: "patch", - }, - { - type: "refactor", - release: "patch", - }, - { - type: "style", - release: "patch", - }, - { - type: "test", - release: "patch", - }, - { - type: "fix", - release: "patch", - }, - ], - }, - ], - [ - "@semantic-release/release-notes-generator", - { - parserOpts: { - mergePattern: /^Merge pull request #(\d+) from (.*)$/, - mergeCorrespondence: ["id", "source"], - }, - writerOpts: { transform: customTransform }, - }, - ], - "@semantic-release/changelog", - [ - "@semantic-release/npm", - { - npmPublish: true, - }, +export default { + branches: [ + "+([0-9])?(.{+([0-9]),x}).x", + "master", + "next", + "next-major", + { name: "beta", prerelease: true }, + { name: "alpha", prerelease: true }, + ], + repositoryUrl: "git@github.com:deriv-com/deriv-static-content.git", + plugins: [ + [ + "@semantic-release/commit-analyzer", + { + releaseRules: [ + { + type: "feat", + release: "minor", + }, + { + type: "build", + release: "patch", + }, + { + type: "ci", + release: "patch", + }, + { + type: "chore", + release: "patch", + }, + { + type: "docs", + release: "patch", + }, + { + type: "refactor", + release: "patch", + }, + { + type: "style", + release: "patch", + }, + { + type: "test", + release: "patch", + }, + { + type: "fix", + release: "patch", + }, ], - "@semantic-release/github", + }, + ], + [ + "@semantic-release/release-notes-generator", + { + parserOpts: { + mergePattern: /^Merge pull request #(\d+) from (.*)$/, + mergeCorrespondence: ["id", "source"], + }, + writerOpts: { transform: customTransform }, + }, + ], + "@semantic-release/changelog", + [ + "@semantic-release/exec", + { + prepareCmd: "cd public/scripts/packages/marketing && npm run build", + publishCmd: "cd public/scripts/packages/marketing && npm run publish", + }, + ], + [ + "@semantic-release/npm", + { + npmPublish: true, + }, ], + "@semantic-release/github", + ], };