@cycjimmy/semantic-release-action 4.0.0 → 4.1.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 +15 -14
- package/action.yml +3 -0
- package/docs/CHANGELOG.md +12 -0
- package/package.json +2 -2
- package/src/handleOptions.js +15 -0
- package/src/index.js +3 -1
- package/src/inputs.json +2 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ GitHub Action for [Semantic Release][semantic-url].
|
|
|
18
18
|
```yaml
|
|
19
19
|
steps:
|
|
20
20
|
- name: Checkout
|
|
21
|
-
uses: actions/checkout@
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
22
|
- name: Semantic Release
|
|
23
23
|
uses: cycjimmy/semantic-release-action@v4
|
|
24
24
|
env:
|
|
@@ -27,7 +27,7 @@ steps:
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
**IMPORTANT**: `GITHUB_TOKEN` does not have the required permissions to operate on protected branches.
|
|
30
|
-
If you are using this action for protected branches, replace `GITHUB_TOKEN` with [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). If using the `@semantic-release/git` plugin for protected branches, avoid persisting credentials as part of `actions/checkout@
|
|
30
|
+
If you are using this action for protected branches, replace `GITHUB_TOKEN` with [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). If using the `@semantic-release/git` plugin for protected branches, avoid persisting credentials as part of `actions/checkout@v4` by setting the parameter `persist-credentials: false`. This credential does not have the required permission to operate on protected branches.
|
|
31
31
|
|
|
32
32
|
#### Private Packages
|
|
33
33
|
|
|
@@ -53,7 +53,8 @@ then make sure that you configure this in your `package.json` file:
|
|
|
53
53
|
| ci | false | Whether to run semantic release with CI support. [[Details](#ci)]<br>Support for **semantic-release above v16**. |
|
|
54
54
|
| extends | false | Use a sharable configuration [[Details](#extends)] |
|
|
55
55
|
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
|
|
56
|
-
|
|
|
56
|
+
| tag_format | false | Specify format of tag (useful for monorepos) |
|
|
57
|
+
| repository_url | false | The Git repository url. If no repository url specified, current repository will be used by default. |
|
|
57
58
|
|
|
58
59
|
#### semantic_version
|
|
59
60
|
> {Optional Input Parameter} Specify version range for semantic-release.
|
|
@@ -61,13 +62,13 @@ then make sure that you configure this in your `package.json` file:
|
|
|
61
62
|
```yaml
|
|
62
63
|
steps:
|
|
63
64
|
- name: Checkout
|
|
64
|
-
uses: actions/checkout@
|
|
65
|
+
uses: actions/checkout@v4
|
|
65
66
|
- name: Semantic Release
|
|
66
67
|
uses: cycjimmy/semantic-release-action@v4
|
|
67
68
|
with:
|
|
68
69
|
semantic_version: 19.0.5 # It is recommended to specify a version range
|
|
69
70
|
# for semantic-release when using
|
|
70
|
-
# semantic-release-action lower than @
|
|
71
|
+
# semantic-release-action lower than @v4
|
|
71
72
|
env:
|
|
72
73
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
73
74
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -81,7 +82,7 @@ If no version range is specified with `cycjimmy/semantic-release-action@v4` then
|
|
|
81
82
|
```yaml
|
|
82
83
|
steps:
|
|
83
84
|
- name: Checkout
|
|
84
|
-
uses: actions/checkout@
|
|
85
|
+
uses: actions/checkout@v4
|
|
85
86
|
- name: Semantic Release
|
|
86
87
|
uses: cycjimmy/semantic-release-action@v4
|
|
87
88
|
with:
|
|
@@ -127,7 +128,7 @@ See [configuration#branches](https://semantic-release.gitbook.io/semantic-releas
|
|
|
127
128
|
```yaml
|
|
128
129
|
steps:
|
|
129
130
|
- name: Checkout
|
|
130
|
-
uses: actions/checkout@
|
|
131
|
+
uses: actions/checkout@v4
|
|
131
132
|
- name: Semantic Release
|
|
132
133
|
uses: cycjimmy/semantic-release-action@v4
|
|
133
134
|
with:
|
|
@@ -152,7 +153,7 @@ Github Action Workflow:
|
|
|
152
153
|
```yaml
|
|
153
154
|
steps:
|
|
154
155
|
- name: Checkout
|
|
155
|
-
uses: actions/checkout@
|
|
156
|
+
uses: actions/checkout@v4
|
|
156
157
|
- name: Semantic Release
|
|
157
158
|
uses: cycjimmy/semantic-release-action@v4
|
|
158
159
|
with:
|
|
@@ -182,7 +183,7 @@ Release Config:
|
|
|
182
183
|
```yaml
|
|
183
184
|
steps:
|
|
184
185
|
- name: Checkout
|
|
185
|
-
uses: actions/checkout@
|
|
186
|
+
uses: actions/checkout@v4
|
|
186
187
|
- name: Semantic Release
|
|
187
188
|
uses: cycjimmy/semantic-release-action@v4
|
|
188
189
|
with:
|
|
@@ -198,7 +199,7 @@ steps:
|
|
|
198
199
|
```yaml
|
|
199
200
|
steps:
|
|
200
201
|
- name: Checkout
|
|
201
|
-
uses: actions/checkout@
|
|
202
|
+
uses: actions/checkout@v4
|
|
202
203
|
- name: Semantic Release
|
|
203
204
|
uses: cycjimmy/semantic-release-action@v4
|
|
204
205
|
with:
|
|
@@ -216,7 +217,7 @@ The action can be used with `extends` option to extend an existing [sharable con
|
|
|
216
217
|
```yaml
|
|
217
218
|
steps:
|
|
218
219
|
- name: Checkout
|
|
219
|
-
uses: actions/checkout@
|
|
220
|
+
uses: actions/checkout@v4
|
|
220
221
|
- name: Semantic Release
|
|
221
222
|
uses: cycjimmy/semantic-release-action@v4
|
|
222
223
|
with:
|
|
@@ -236,7 +237,7 @@ This action run semantic release in the github provided workspace by default. Yo
|
|
|
236
237
|
```yaml
|
|
237
238
|
steps:
|
|
238
239
|
- name: Checkout
|
|
239
|
-
uses: actions/checkout@
|
|
240
|
+
uses: actions/checkout@v4
|
|
240
241
|
- name: Semantic Release
|
|
241
242
|
uses: cycjimmy/semantic-release-action@v4
|
|
242
243
|
with:
|
|
@@ -253,7 +254,7 @@ The default tag format on semantic-release is `v{version}`. You can override tha
|
|
|
253
254
|
```yaml
|
|
254
255
|
steps:
|
|
255
256
|
- name: Checkout
|
|
256
|
-
uses: actions/checkout@
|
|
257
|
+
uses: actions/checkout@v4
|
|
257
258
|
- name: Semantic Release
|
|
258
259
|
uses: cycjimmy/semantic-release-action@v4
|
|
259
260
|
with:
|
|
@@ -283,7 +284,7 @@ steps:
|
|
|
283
284
|
```yaml
|
|
284
285
|
steps:
|
|
285
286
|
- name: Checkout
|
|
286
|
-
uses: actions/checkout@
|
|
287
|
+
uses: actions/checkout@v4
|
|
287
288
|
- name: Semantic Release
|
|
288
289
|
uses: cycjimmy/semantic-release-action@v4
|
|
289
290
|
id: semantic # Need an `id` for output variables
|
package/action.yml
CHANGED
|
@@ -32,6 +32,9 @@ inputs:
|
|
|
32
32
|
tag_format:
|
|
33
33
|
required: false
|
|
34
34
|
description: 'The default tag format on semantic-release is v{version}. You can override that behavior using this option.'
|
|
35
|
+
repository_url:
|
|
36
|
+
required: false
|
|
37
|
+
description: 'The Git repository url. If no repository url specified, current repository will be used by default.'
|
|
35
38
|
outputs:
|
|
36
39
|
new_release_published:
|
|
37
40
|
description: 'Whether a new release was published'
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [4.1.0](https://github.com/cycjimmy/semantic-release-action/compare/v4.0.0...v4.1.0) (2024-03-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix syntax error for importing ([4297675](https://github.com/cycjimmy/semantic-release-action/commit/42976755bc1a5e38051e756e3a2344ea8f354379))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add repository_url input ([8dffec4](https://github.com/cycjimmy/semantic-release-action/commit/8dffec4efa886f02052787d688bfccb2e9983b1a))
|
|
12
|
+
|
|
1
13
|
# [4.0.0](https://github.com/cycjimmy/semantic-release-action/compare/v3.4.2...v4.0.0) (2023-08-31)
|
|
2
14
|
|
|
3
15
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cycjimmy/semantic-release-action",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
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.9",
|
|
26
26
|
"@semantic-release/changelog": "^6.0.3",
|
|
27
27
|
"@semantic-release/git": "^10.0.1",
|
|
28
|
-
"semantic-release": "^
|
|
28
|
+
"semantic-release": "^23.0.5"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/src/handleOptions.js
CHANGED
|
@@ -116,3 +116,18 @@ exports.handleTagFormat = () => {
|
|
|
116
116
|
return {};
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Handle repository-url Option
|
|
122
|
+
* @returns {{}|{r: String}}
|
|
123
|
+
*/
|
|
124
|
+
exports.handleRepositoryUrlOption = () => {
|
|
125
|
+
const repositoryUrl = core.getInput(inputs.repository_url);
|
|
126
|
+
core.debug(`repository_url input: ${repositoryUrl}`);
|
|
127
|
+
|
|
128
|
+
if (repositoryUrl) {
|
|
129
|
+
return { r: repositoryUrl };
|
|
130
|
+
} else {
|
|
131
|
+
return {};
|
|
132
|
+
}
|
|
133
|
+
};
|
package/src/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const {
|
|
|
5
5
|
handleCiOption,
|
|
6
6
|
handleExtends,
|
|
7
7
|
handleTagFormat,
|
|
8
|
+
handleRepositoryUrlOption,
|
|
8
9
|
} = require('./handleOptions');
|
|
9
10
|
const setUpJob = require('./setUpJob.task');
|
|
10
11
|
const installSpecifyingVersionSemantic = require('./installSpecifyingVersionSemantic.task');
|
|
@@ -32,7 +33,8 @@ const release = async () => {
|
|
|
32
33
|
...handleDryRunOption(),
|
|
33
34
|
...handleCiOption(),
|
|
34
35
|
...handleExtends(),
|
|
35
|
-
...handleTagFormat()
|
|
36
|
+
...handleTagFormat(),
|
|
37
|
+
...handleRepositoryUrlOption()
|
|
36
38
|
});
|
|
37
39
|
|
|
38
40
|
await cleanupNpmrc();
|