autorel 1.0.6 → 1.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 +35 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ Autorel automatically does the following, if appropriate:
|
|
|
14
14
|
|
|
15
15
|
- Bumps the version based on the commit messages
|
|
16
16
|
- Creates a new release on GitHub with Release Notes
|
|
17
|
-
- Publishes the
|
|
18
|
-
- Runs any arbitrary command or bash script
|
|
17
|
+
- Publishes the package to NPM
|
|
18
|
+
- Runs any arbitrary command or bash script
|
|
19
19
|
|
|
20
20
|
**✅ Conventional Commit and SemVer Compliant**
|
|
21
21
|
- 100% compliant with Conventional Commits and SemVer out of the box, including "!" for breaking changes
|
|
@@ -23,22 +23,25 @@ Autorel automatically does the following, if appropriate:
|
|
|
23
23
|
**😃 Simple & Easy to Use**
|
|
24
24
|
- No confusing configuration files or complex setup
|
|
25
25
|
- Works with any CI/CD system, including GitHub Actions
|
|
26
|
-
- Built-in
|
|
26
|
+
- Built-in bash script support
|
|
27
27
|
|
|
28
28
|
**🚀 Fast & Lightweight**
|
|
29
|
-
- Minimal dependencies and fast execution
|
|
29
|
+
- Minimal dependencies and fast execution written in TypeScript
|
|
30
|
+
- Comprehensive test coverage
|
|
30
31
|
- Less broken builds and more time to focus on your code!
|
|
31
32
|
|
|
32
33
|
# Table of Contents
|
|
33
34
|
|
|
34
35
|
- [Example Usage (CLI)](#example-usage-cli)
|
|
35
36
|
- [Example Usage (Library)](#example-usage-library)
|
|
37
|
+
- [Quick Start](#quick-start)
|
|
36
38
|
- [Usage with GitHub Actions](#usage-with-github-actions)
|
|
37
39
|
- [Example Commit Messages](#example-commit-messages)
|
|
38
40
|
- [Configuration](#configuration)
|
|
39
41
|
- [Sample YAML Configuration](#sample-yaml-configuration)
|
|
40
42
|
- [Types](#types)
|
|
41
43
|
- [Debug Mode](#debug-mode)
|
|
44
|
+
- [FAQ](docs/FAQ.md)
|
|
42
45
|
- [Support, Feedback, and Contributions](#support-feedback-and-contributions)
|
|
43
46
|
|
|
44
47
|
# Example Usage (CLI)
|
|
@@ -61,6 +64,8 @@ npm i -g autorel
|
|
|
61
64
|
autorel --publish
|
|
62
65
|
```
|
|
63
66
|
|
|
67
|
+
> ❗️ 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)
|
|
68
|
+
|
|
64
69
|
# Example Usage (Library)
|
|
65
70
|
|
|
66
71
|
1. Install `autorel` as a dependency
|
|
@@ -74,12 +79,31 @@ autorel --publish
|
|
|
74
79
|
```typescript
|
|
75
80
|
import {autorel} from 'autorel';
|
|
76
81
|
|
|
77
|
-
autorel({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
82
|
+
const nextVersion = await autorel({publish: true});
|
|
83
|
+
|
|
84
|
+
console.log(`Next version is ${nextVersion}`);
|
|
81
85
|
```
|
|
82
|
-
|
|
86
|
+
# Quick Start
|
|
87
|
+
|
|
88
|
+
There are many ways to use `autorel`. Here are a few common scenarios:
|
|
89
|
+
|
|
90
|
+
1. **CLI**: Run `autorel` directly from the command line
|
|
91
|
+
2. **Library**: Import `autorel` into your project and use it as a library
|
|
92
|
+
3. **CI/CD pipeline**: Use `autorel` with GitHub Actions, CircleCI, Jenkins, etc. to automate your releases
|
|
93
|
+
|
|
94
|
+
You can also use `autorel` with other languages, not just Node.js. Just make sure you have Node.js installed on the system.
|
|
95
|
+
|
|
96
|
+
If you want to use GitHub Actions to automate your releases, [see here](#usage-with-github-actions) for setup and sample configuration.
|
|
97
|
+
|
|
98
|
+
It's also recommended you create a `.autorel.yaml` file in the root of your project to [configure](#configuration) `autorel`. Example:
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
branches:
|
|
102
|
+
- {name: 'main'}
|
|
103
|
+
- {name: 'alpha', channel: 'alpha'}
|
|
104
|
+
- {name: 'beta', channel: 'beta'}
|
|
105
|
+
publish: true
|
|
106
|
+
```
|
|
83
107
|
|
|
84
108
|
# Usage with GitHub Actions
|
|
85
109
|
|
|
@@ -124,6 +148,8 @@ jobs:
|
|
|
124
148
|
run: npx autorel --publish
|
|
125
149
|
```
|
|
126
150
|
|
|
151
|
+
It's also recommended you create a `.autorel.yaml` file in the root of your project to [configure](#configuration) `autorel`.
|
|
152
|
+
|
|
127
153
|
# Example Commit Messages
|
|
128
154
|
|
|
129
155
|
Here are some examples of commit messages and the resulting version bump (default configuration):
|
package/dist/index.d.ts
CHANGED
|
@@ -20,4 +20,4 @@ export type Config = {
|
|
|
20
20
|
branches: ReleaseBranch[];
|
|
21
21
|
};
|
|
22
22
|
export declare function getPrereleaseChannel(config: Config): string | undefined;
|
|
23
|
-
export declare function autorel(args: Config): Promise<
|
|
23
|
+
export declare function autorel(args: Config): Promise<string | undefined>;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autorel",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.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)",
|