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
4 changes: 1 addition & 3 deletions .github/workflows/release-and-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ jobs:
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

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

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: |
conventional-changelog-conventionalcommits
@anolilab/semantic-release-pnpm
@semantic-release/exec
@semantic-release/git
@cleyrop-org/semantic-release-backmerge
Expand Down
67 changes: 0 additions & 67 deletions .releaserc

This file was deleted.

102 changes: 102 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// 1. Define all packages with a publish flag
const packages = {
// Root package: version gets bumped, but NOT published
'.': { publish: false },
// Published projects
'projects/amc-docs': { publish: true },
'projects/color-picker': { publish: true },
'projects/datetime-picker': { publish: true },
'projects/file-input': { publish: true },
};

// 2. Generate npm plugin entries dynamically
// - npmPublish: true → bumps version AND runs npm publish
// - npmPublish: false → bumps version ONLY (skips publish)
const npmPlugins = Object.entries(packages).map(([pkgRoot, config]) => [
'@anolilab/semantic-release-pnpm',
{
npmPublish: config.publish,
pkgRoot,
},
]);

// 3. Generate the list of package.json files to commit
// Handles the root path '.' specially
const gitAssets = Object.keys(packages).map((pkg) =>
pkg === '.' ? 'package.json' : `${pkg}/package.json`
);

module.exports = {
branches: [
{ name: 'main' },
{ name: 'dev', channel: 'next', prerelease: 'next' },
],

plugins: [
// --- Static plugins ---
[
'@semantic-release/commit-analyzer',
{
preset: 'conventionalcommits',
releaseRules: [
{ type: 'refactor', scope: '*', release: 'patch' },
{ type: 'chore', scope: 'update', release: 'patch' },
],
},
],
[
'@semantic-release/release-notes-generator',
{
preset: 'conventionalcommits',
presetConfig: {
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'chore', section: 'Chores', hidden: false },
{ type: 'refactor', section: 'Code Refactoring', hidden: false },
],
},
},
],

// --- Dynamic npm plugins (bump versions for ALL, publish only some) ---
...npmPlugins,

// --- Build step (runs AFTER versions are bumped) ---
[
'@semantic-release/exec',
{
prepareCmd: 'pnpm install --frozen-lockfile && pnpm -r run build',
},
],

// --- Commit ALL bumped package.json files ---
[
'@semantic-release/git',
{
assets: gitAssets,
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],

// --- GitHub release ---
[
'@semantic-release/github',
{
successCommentCondition: false,
},
],

// --- Backmerge ---
[
'@cleyrop-org/semantic-release-backmerge',
{
backmergeBranches: [
{ from: 'main', to: 'dev' },
],
message: 'chore(release): prepare for next release [skip ci]',
clearWorkspace: true,
},
],
],
};
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngx-mce/amc",
"version": "22.0.3",
"version": "22.1.0-next.2",
"description": "Angular Material Components Example Application",
"author": "Felipe B.",
"repository": {
Expand Down Expand Up @@ -43,30 +43,30 @@
"private": true,
"packageManager": "pnpm@11.4.0",
"dependencies": {
"@angular/common": "^22.0.4",
"@angular/compiler": "^22.0.4",
"@angular/core": "^22.0.4",
"@angular/forms": "^22.0.4",
"@angular/material": "^22.0.2",
"@angular/platform-browser": "^22.0.4",
"@angular/platform-browser-dynamic": "^22.0.4",
"@angular/router": "^22.0.4",
"@angular/common": "^22.0.5",
"@angular/compiler": "^22.0.5",
"@angular/core": "^22.0.5",
"@angular/forms": "^22.0.5",
"@angular/material": "^22.0.3",
"@angular/platform-browser": "^22.0.5",
"@angular/platform-browser-dynamic": "^22.0.5",
"@angular/router": "^22.0.5",
"highlight.js": "^11.11.1",
"rxjs": "~7.8.2",
"tslib": "^2.8.1"
},
"devDependencies": {
"@angular-eslint/builder": "^22.0.0",
"@angular/build": "^22.0.4",
"@angular/cdk": "^22.0.2",
"@angular/cli": "^22.0.4",
"@angular/compiler-cli": "^22.0.4",
"@angular/build": "^22.0.5",
"@angular/cdk": "^22.0.3",
"@angular/cli": "^22.0.5",
"@angular/compiler-cli": "^22.0.5",
"@eslint/js": "^10.0.1",
"@types/node": "^26.0.1",
"@types/node": "^26.1.0",
"angular-eslint": "22.0.0",
"eslint": "^10.6.0",
"jsdom": "^29.1.1",
"ng-packagr": "^22.0.0",
"ng-packagr": "^22.0.1",
"ts-node": "~10.9.2",
"typescript": "~6.0.3",
"typescript-eslint": "^8.62.0",
Expand Down
Loading