autorel 2.0.3 → 2.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 +24 -15
- package/dist/config.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,14 +37,15 @@ _Currently only has built-in support for `GitHub` and `NPM`, but you can write y
|
|
|
37
37
|
|
|
38
38
|
- [Example Usage (CLI)](#example-usage-cli)
|
|
39
39
|
- [Example Usage (Library)](#example-usage-library)
|
|
40
|
-
- [Usage with GitHub Actions](#usage-with-github-actions)
|
|
41
40
|
- [Example Commit Messages](#example-commit-messages)
|
|
41
|
+
- [Usage with GitHub Actions](#usage-with-github-actions)
|
|
42
42
|
- [Usage with Other Repositories (not GitHub)](#usage-with-other-repositories-not-github)
|
|
43
43
|
- [Usage with Other Languages (not Node.js)](#usage-with-other-languages-not-nodejs)
|
|
44
44
|
- [Configuration](#configuration)
|
|
45
45
|
- [Sample YAML Configuration](#sample-yaml-configuration)
|
|
46
46
|
- [Types](#types)
|
|
47
47
|
- [Debug Mode](#debug-mode)
|
|
48
|
+
- [About package.json versions](#about-packagejson-versions)
|
|
48
49
|
- [FAQ](docs/faq.md)
|
|
49
50
|
- [Support, Feedback, and Contributions](#support-feedback-and-contributions)
|
|
50
51
|
|
|
@@ -68,7 +69,9 @@ npm i -g autorel
|
|
|
68
69
|
autorel --publish
|
|
69
70
|
```
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
## Avoiding Breaking Changes
|
|
73
|
+
|
|
74
|
+
You may want to add the version number to the npx command to prevent breaking changes in the future. For example, `npx autorel@^2 --publish --run 'echo "Next version is ${NEXT_VERSION}"'`
|
|
72
75
|
|
|
73
76
|
# Example Usage (Library)
|
|
74
77
|
|
|
@@ -88,6 +91,18 @@ autorel --publish
|
|
|
88
91
|
});
|
|
89
92
|
```
|
|
90
93
|
|
|
94
|
+
# Commit Messages
|
|
95
|
+
|
|
96
|
+
Commit messages are parsed to determine the version bump. They must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for automatic version bumping according to semantic versioning.
|
|
97
|
+
|
|
98
|
+
Here are some examples of commit messages and the resulting version bump (default configuration):
|
|
99
|
+
|
|
100
|
+
- `fix: fix a bug` -> `0.0.1`
|
|
101
|
+
- `feat: add new feature` -> `0.1.0`
|
|
102
|
+
- `feat!: add breaking change` -> `1.0.0`
|
|
103
|
+
|
|
104
|
+
You can find more examples in the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) documentation.
|
|
105
|
+
|
|
91
106
|
# Usage with GitHub Actions
|
|
92
107
|
|
|
93
108
|
You can use `autorel` with GitHub Actions to automate your releases (recommended).
|
|
@@ -133,18 +148,6 @@ jobs:
|
|
|
133
148
|
|
|
134
149
|
It's also recommended you create a `.autorel.yaml` file in the root of your project to [configure](#configuration) `autorel`.
|
|
135
150
|
|
|
136
|
-
# Commit Messages
|
|
137
|
-
|
|
138
|
-
Commit messages are parsed to determine the version bump. They must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for automatic version bumping according to semantic versioning.
|
|
139
|
-
|
|
140
|
-
Here are some examples of commit messages and the resulting version bump (default configuration):
|
|
141
|
-
|
|
142
|
-
- `fix: fix a bug` -> `0.0.1`
|
|
143
|
-
- `feat: add new feature` -> `0.1.0`
|
|
144
|
-
- `feat!: add breaking change` -> `1.0.0`
|
|
145
|
-
|
|
146
|
-
You can find more examples in the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) documentation.
|
|
147
|
-
|
|
148
151
|
# Usage with Other Repositories (not GitHub)
|
|
149
152
|
|
|
150
153
|
`autorel` is designed to work with any CI/CD system, not just GitHub Actions. You can use it with GitLab, Bitbucket, Jenkins, or any other system that supports running shell commands.
|
|
@@ -163,7 +166,9 @@ If you're interested in contributing built-in support for other systems, please
|
|
|
163
166
|
|
|
164
167
|
# Configuration
|
|
165
168
|
|
|
166
|
-
When run in CLI mode, `autorel` can be configured via CLI arguments or a `yaml` file. CLI arguments take precedence over the `yaml` file.
|
|
169
|
+
When run in CLI mode, `autorel` can be configured via CLI arguments or a `yaml` file. CLI arguments take precedence over the `yaml` file.
|
|
170
|
+
|
|
171
|
+
However, omitting the `--publish` flag will still publish to NPM if `publish: true` is set in the `yaml` file, and the same for other binary flags.
|
|
167
172
|
|
|
168
173
|
When used as a library, you can pass the configuration directly to the `autorel` function.
|
|
169
174
|
|
|
@@ -313,6 +318,10 @@ AUTOREL_DEBUG=1 npx autorel
|
|
|
313
318
|
|
|
314
319
|
This will output configuration and other debug information.
|
|
315
320
|
|
|
321
|
+
# About package.json versions
|
|
322
|
+
|
|
323
|
+
If using our npm publishing feature, the package.json file's version will be updated in memory before being pushed to npm, as this is the only place where it's actually required. The change will not be pushed to the repository, as it is not necessary and could cause conflicts. See [this post](https://semantic-release.gitbook.io/semantic-release/support/faq)
|
|
324
|
+
|
|
316
325
|
# Support, Feedback, and Contributions
|
|
317
326
|
|
|
318
327
|
- Star this repo if you like it!
|
package/dist/config.js
CHANGED
|
@@ -86,6 +86,7 @@ function readAutorelYaml(filePath = '.autorel.yaml') {
|
|
|
86
86
|
}
|
|
87
87
|
function getConfig(overrides) {
|
|
88
88
|
const localConfig = readAutorelYaml();
|
|
89
|
+
output_1.default.debug(`Yaml: ${JSON.stringify(localConfig, null, 2)}`);
|
|
89
90
|
return {
|
|
90
91
|
...defaults_1.defaultConfig,
|
|
91
92
|
...localConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autorel",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Automate semantic releases based on conventional commits. Similar to semantic-release but much simpler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Marc H. Weiner <mhweiner234@gmail.com> (https://mhweiner.com)",
|