@cycjimmy/semantic-release-action 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.1.1](https://github.com/cycjimmy/semantic-release-action/compare/v3.1.0...v3.1.1) (2022-08-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * set last_release_version output even if no release has been published ([b1467cd](https://github.com/cycjimmy/semantic-release-action/commit/b1467cd17e70d963d7925a60266adb249ee2223d))
7
+
1
8
  # [3.1.0](https://github.com/cycjimmy/semantic-release-action/compare/v3.0.0...v3.1.0) (2022-08-05)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cycjimmy/semantic-release-action",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "GitHub Action for Semantic Release",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,6 +25,6 @@
25
25
  "@cycjimmy/awesome-js-funcs": "^4.0.4",
26
26
  "@semantic-release/changelog": "^6.0.1",
27
27
  "@semantic-release/git": "^10.0.1",
28
- "semantic-release": "^19.0.3"
28
+ "semantic-release": "^19.0.5"
29
29
  }
30
30
  }
@@ -14,6 +14,11 @@ module.exports = async (result) => {
14
14
 
15
15
  const {lastRelease, commits, nextRelease, releases} = result;
16
16
 
17
+ if (lastRelease.version) {
18
+ core.debug(`The last release was "${lastRelease.version}".`);
19
+ core.setOutput(outputs.last_release_version, lastRelease.version)
20
+ }
21
+
17
22
  if (!nextRelease) {
18
23
  core.debug('No release published.');
19
24
  return Promise.resolve();
@@ -21,10 +26,6 @@ module.exports = async (result) => {
21
26
 
22
27
  core.debug(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`);
23
28
 
24
- if (lastRelease.version) {
25
- core.debug(`The last release was "${lastRelease.version}".`);
26
- }
27
-
28
29
  for (const release of releases) {
29
30
  core.debug(`The release was published with plugin "${release.pluginName}".`);
30
31
  }
@@ -40,5 +41,4 @@ module.exports = async (result) => {
40
41
  core.setOutput(outputs.new_release_patch_version, patch);
41
42
  core.setOutput(outputs.new_release_channel, channel);
42
43
  core.setOutput(outputs.new_release_notes, notes);
43
- core.setOutput(outputs.last_release_version, lastRelease.version)
44
44
  };