Skip to content

Commit a573495

Browse files
authored
feat: release to npm after user defined plugins (#105)
* feat: release to npm after creating git commit With `@semantic-release/npm` being used before `@semantic-release/git` the NPM release doesn't contain updated `CHANGELOG.md` and `package.json`. And that can be very confusing for the consumers of the package. Simply changing the order of plugins should fix that. GitHub plugin already is in that order, so it will be consistent. * put both npm and github before git plugin
1 parent 8a145dd commit a573495

File tree

1 file changed

+8
-5
lines changed
  • packages/nx-semantic-release/src/executors/semantic-release

1 file changed

+8
-5
lines changed

packages/nx-semantic-release/src/executors/semantic-release/plugins.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,17 @@ export const resolvePlugins = (
8484
],
8585
]
8686
: emptyArray),
87-
...(options.npm ? getNpmPlugin(context, options) : emptyArray),
8887
...(options.plugins ?? []),
8988
];
9089

90+
if (options.npm) {
91+
defaultPlugins.push(...getNpmPlugin(context, options));
92+
}
93+
94+
if (options.github) {
95+
defaultPlugins.push(['@semantic-release/github', options.githubOptions]);
96+
}
97+
9198
if (options.git) {
9299
defaultPlugins.push([
93100
'@semantic-release/git',
@@ -109,9 +116,5 @@ export const resolvePlugins = (
109116
]);
110117
}
111118

112-
if (options.github) {
113-
defaultPlugins.push(['@semantic-release/github', options.githubOptions]);
114-
}
115-
116119
return defaultPlugins;
117120
};

0 commit comments

Comments
 (0)