@cycjimmy/semantic-release-action 3.4.1 → 4.0.0

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/README.md CHANGED
@@ -20,7 +20,7 @@ steps:
20
20
  - name: Checkout
21
21
  uses: actions/checkout@v3
22
22
  - name: Semantic Release
23
- uses: cycjimmy/semantic-release-action@v3
23
+ uses: cycjimmy/semantic-release-action@v4
24
24
  env:
25
25
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26
26
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -63,7 +63,7 @@ steps:
63
63
  - name: Checkout
64
64
  uses: actions/checkout@v3
65
65
  - name: Semantic Release
66
- uses: cycjimmy/semantic-release-action@v3
66
+ uses: cycjimmy/semantic-release-action@v4
67
67
  with:
68
68
  semantic_version: 19.0.5 # It is recommended to specify a version range
69
69
  # for semantic-release when using
@@ -73,9 +73,7 @@ steps:
73
73
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
74
74
  ```
75
75
 
76
- If no version range is specified with `cycjimmy/semantic-release-action@v3` then [semantic-release](https://github.com/semantic-release/semantic-release/) version [19.0.5](https://github.com/semantic-release/semantic-release/releases/tag/v19.0.5) is used. Earlier versions of `cycjimmy/semantic-release-action` default to using the latest version of [semantic-release](https://github.com/semantic-release/semantic-release/), so in this case it is recommended to specify version 19 or lower to avoid compatibility issues.
77
-
78
- *Note: [Version 20.0.0](https://github.com/semantic-release/semantic-release/releases/tag/v20.0.0) of [semantic-release](https://github.com/semantic-release/semantic-release/) and later is currently incompatible with `cycjimmy/semantic-release-action`, since it requires Node.js 18. GitHub does not provide this environment yet for [JavaScript actions](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions).*
76
+ If no version range is specified with `cycjimmy/semantic-release-action@v4` then [semantic-release](https://github.com/semantic-release/semantic-release/) version [21.1.1](https://github.com/semantic-release/semantic-release/releases/tag/v21.1.1) is used.
79
77
 
80
78
  #### branches
81
79
  > {Optional Input Parameter} The branches on which releases should happen.<br>`branches` supports for **semantic-release above v16**.
@@ -85,7 +83,7 @@ steps:
85
83
  - name: Checkout
86
84
  uses: actions/checkout@v3
87
85
  - name: Semantic Release
88
- uses: cycjimmy/semantic-release-action@v3
86
+ uses: cycjimmy/semantic-release-action@v4
89
87
  with:
90
88
  semantic_version: 16
91
89
  # you can set branches for semantic-release above v16.
@@ -131,7 +129,7 @@ steps:
131
129
  - name: Checkout
132
130
  uses: actions/checkout@v3
133
131
  - name: Semantic Release
134
- uses: cycjimmy/semantic-release-action@v3
132
+ uses: cycjimmy/semantic-release-action@v4
135
133
  with:
136
134
  semantic_version: 15.13.28
137
135
  # you can set branch for semantic-release older than v16.
@@ -156,7 +154,7 @@ steps:
156
154
  - name: Checkout
157
155
  uses: actions/checkout@v3
158
156
  - name: Semantic Release
159
- uses: cycjimmy/semantic-release-action@v3
157
+ uses: cycjimmy/semantic-release-action@v4
160
158
  with:
161
159
  # You can specify specifying version range for the extra plugins if you prefer.
162
160
  extra_plugins: |
@@ -186,7 +184,7 @@ steps:
186
184
  - name: Checkout
187
185
  uses: actions/checkout@v3
188
186
  - name: Semantic Release
189
- uses: cycjimmy/semantic-release-action@v3
187
+ uses: cycjimmy/semantic-release-action@v4
190
188
  with:
191
189
  dry_run: true
192
190
  env:
@@ -202,7 +200,7 @@ steps:
202
200
  - name: Checkout
203
201
  uses: actions/checkout@v3
204
202
  - name: Semantic Release
205
- uses: cycjimmy/semantic-release-action@v3
203
+ uses: cycjimmy/semantic-release-action@v4
206
204
  with:
207
205
  ci: false
208
206
  env:
@@ -220,7 +218,7 @@ steps:
220
218
  - name: Checkout
221
219
  uses: actions/checkout@v3
222
220
  - name: Semantic Release
223
- uses: cycjimmy/semantic-release-action@v3
221
+ uses: cycjimmy/semantic-release-action@v4
224
222
  with:
225
223
  # You can extend an existing shareable configuration.
226
224
  # And you can specify version range for the shareable configuration if you prefer.
@@ -240,7 +238,7 @@ steps:
240
238
  - name: Checkout
241
239
  uses: actions/checkout@v3
242
240
  - name: Semantic Release
243
- uses: cycjimmy/semantic-release-action@v3
241
+ uses: cycjimmy/semantic-release-action@v4
244
242
  with:
245
243
  # You can select another working directory like a subdirectory for example.
246
244
  working_directory: ./code
@@ -257,9 +255,9 @@ steps:
257
255
  - name: Checkout
258
256
  uses: actions/checkout@v3
259
257
  - name: Semantic Release
260
- uses: cycjimmy/semantic-release-action@v3
258
+ uses: cycjimmy/semantic-release-action@v4
261
259
  with:
262
- tag_format: custom-v{version}
260
+ tag_format: custom-v${version}
263
261
  env:
264
262
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
265
263
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -287,7 +285,7 @@ steps:
287
285
  - name: Checkout
288
286
  uses: actions/checkout@v3
289
287
  - name: Semantic Release
290
- uses: cycjimmy/semantic-release-action@v3
288
+ uses: cycjimmy/semantic-release-action@v4
291
289
  id: semantic # Need an `id` for output variables
292
290
  env:
293
291
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/action.yml CHANGED
@@ -58,5 +58,5 @@ outputs:
58
58
  last_release_git_tag:
59
59
  description: 'The Git tag associated with the last release, if there was one.'
60
60
  runs:
61
- using: 'node16'
61
+ using: 'node20'
62
62
  main: 'index.js'
package/docs/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # [4.0.0](https://github.com/cycjimmy/semantic-release-action/compare/v3.4.2...v4.0.0) (2023-08-31)
2
+
3
+
4
+ ### Features
5
+
6
+ * update node version on runner to 20 ([0c20554](https://github.com/cycjimmy/semantic-release-action/commit/0c2055456eeae973aeeb66cf5082061badb3502c))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * set the default node version to 20
12
+
13
+ ## [3.4.2](https://github.com/cycjimmy/semantic-release-action/compare/v3.4.1...v3.4.2) (2023-03-30)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * fix installation error for npm-audit ([86a0e59](https://github.com/cycjimmy/semantic-release-action/commit/86a0e59803808ad228284efb42a130def7974b7c)), closes [#159](https://github.com/cycjimmy/semantic-release-action/issues/159)
19
+
1
20
  ## [3.4.1](https://github.com/cycjimmy/semantic-release-action/compare/v3.4.0...v3.4.1) (2023-03-30)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cycjimmy/semantic-release-action",
3
- "version": "3.4.1",
3
+ "version": "4.0.0",
4
4
  "description": "GitHub Action for Semantic Release",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,9 +22,9 @@
22
22
  "homepage": "https://github.com/cycjimmy/semantic-release-action#readme",
23
23
  "dependencies": {
24
24
  "@actions/core": "^1.10.0",
25
- "@cycjimmy/awesome-js-funcs": "^4.0.4",
25
+ "@cycjimmy/awesome-js-funcs": "^4.0.9",
26
26
  "@semantic-release/changelog": "^6.0.3",
27
27
  "@semantic-release/git": "^10.0.1",
28
- "semantic-release": "^19.0.5"
28
+ "semantic-release": "^21.1.1"
29
29
  }
30
30
  }
@@ -47,6 +47,7 @@ exports.handleBranchesOption = () => {
47
47
  */
48
48
  exports.handleDryRunOption = () => {
49
49
  const dryRun = core.getInput(inputs.dry_run);
50
+ core.debug(`dryRun input: ${dryRun}`);
50
51
 
51
52
  switch (dryRun) {
52
53
  case 'true':
@@ -66,6 +67,7 @@ exports.handleDryRunOption = () => {
66
67
  */
67
68
  exports.handleCiOption = () => {
68
69
  const ci = core.getInput(inputs.ci);
70
+ core.debug(`ci input: ${ci}`);
69
71
 
70
72
  switch (ci) {
71
73
  case 'true':
@@ -85,6 +87,7 @@ exports.handleCiOption = () => {
85
87
  */
86
88
  exports.handleExtends = () => {
87
89
  const extend = core.getInput(inputs.extends);
90
+ core.debug(`extend input: ${extend}`);
88
91
 
89
92
  if (extend) {
90
93
  const extendModuleNames = extend.split(/\r?\n/)
@@ -103,6 +106,7 @@ exports.handleExtends = () => {
103
106
  */
104
107
  exports.handleTagFormat = () => {
105
108
  const tagFormat = core.getInput(inputs.tag_format);
109
+ core.debug(`citagFormat input: ${tagFormat}`);
106
110
 
107
111
  if (tagFormat) {
108
112
  return {
package/src/index.js CHANGED
@@ -26,8 +26,8 @@ const release = async () => {
26
26
  await preInstall(core.getInput(inputs.extra_plugins));
27
27
  await preInstall(core.getInput(inputs.extends));
28
28
 
29
- const semanticRelease = require('semantic-release');
30
- const result = await semanticRelease({
29
+ const semanticRelease = await import('semantic-release');
30
+ const result = await semanticRelease.default({
31
31
  ...handleBranchesOption(),
32
32
  ...handleDryRunOption(),
33
33
  ...handleCiOption(),
@@ -13,7 +13,7 @@ module.exports = async () => {
13
13
  ? `@${semantic_version}`
14
14
  : '';
15
15
 
16
- const {stdout, stderr} = await exec(`npm install semantic-release${versionSuffix} --silent`, {
16
+ const {stdout, stderr} = await exec(`npm install semantic-release${versionSuffix} --no-audit --silent`, {
17
17
  cwd: path.resolve(__dirname, '..')
18
18
  });
19
19
  core.debug(stdout);
@@ -12,9 +12,9 @@ module.exports = async extras => {
12
12
  }
13
13
 
14
14
  const _extras = extras.replace(/['"]/g, '').replace(/[\n\r]/g, ' ');
15
- const silentFlag = process.env.RUNNER_DEBUG == '1' ? '' : '--silent';
15
+ const silentFlag = process.env.RUNNER_DEBUG === '1' ? '' : '--silent';
16
16
 
17
- const { stdout, stderr } = await exec(`npm install ${_extras} ${silentFlag}`, {
17
+ const { stdout, stderr } = await exec(`npm install ${_extras} --no-audit ${silentFlag}`, {
18
18
  cwd: path.resolve(__dirname, '..')
19
19
  });
20
20
  core.debug(stdout);
@@ -12,7 +12,7 @@ module.exports = async (result) => {
12
12
  return Promise.resolve();
13
13
  }
14
14
 
15
- const {lastRelease, commits, nextRelease, releases} = result;
15
+ const {lastRelease, commits, nextRelease, releases} = await result;
16
16
 
17
17
  if (lastRelease.version) {
18
18
  core.debug(`The last release was "${lastRelease.version}".`);