autorel 0.0.28 → 0.0.30
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 +49 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
[](https://conventionalcommits.org)
|
|
11
11
|
[]()
|
|
12
12
|
|
|
13
|
-
Automate releases based on [SemVer](https://semver.org/) and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Like `semantic-release` and `release-please` but simpler
|
|
13
|
+
Automate releases based on [SemVer](https://semver.org/) and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Like `semantic-release` and `release-please` but simpler and faster.
|
|
14
14
|
|
|
15
15
|
Autorel automatically does the following, if appropriate:
|
|
16
16
|
|
|
17
17
|
- Bumps the version based on the commit messages
|
|
18
18
|
- Creates a new release on GitHub with Release Notes
|
|
19
19
|
- Publishes the release to NPM
|
|
20
|
-
-
|
|
20
|
+
- Runs any arbitrary command or bash script after the release is complete
|
|
21
21
|
|
|
22
22
|
**✅ Conventional Commit and SemVer Compliant**
|
|
23
|
-
|
|
23
|
+
-`autorel` is 100% compliant with Conventional Commits and SemVer out of the box, including "!" for breaking changes
|
|
24
24
|
|
|
25
25
|
**😃 Simple & Easy to Use**
|
|
26
26
|
- No confusing configuration files or complex setup
|
|
27
27
|
- Works with any CI/CD system, including GitHub Actions
|
|
28
|
-
-
|
|
28
|
+
- Built-in TypeScript and bash script support
|
|
29
29
|
|
|
30
30
|
**💪 Flexible & Powerful**
|
|
31
31
|
- Use via `npx`, or import as a library
|
|
@@ -36,6 +36,7 @@ Autorel automatically does the following, if appropriate:
|
|
|
36
36
|
|
|
37
37
|
- [Example Usage (CLI)](#example-usage-cli)
|
|
38
38
|
- [Example Usage (Library)](#example-usage-library)
|
|
39
|
+
- [Usage with GitHub Actions](#usage-with-github-actions)
|
|
39
40
|
- [Configuration](#configuration)
|
|
40
41
|
- [Sample YAML Configuration](#sample-yaml-configuration)
|
|
41
42
|
- [Types](#types)
|
|
@@ -76,11 +77,54 @@ autorel --publish
|
|
|
76
77
|
|
|
77
78
|
autorel({
|
|
78
79
|
publish: true
|
|
79
|
-
run: 'echo "
|
|
80
|
+
run: 'echo "Next version is ${NEXT_VERSION}"'
|
|
80
81
|
});
|
|
81
82
|
```
|
|
82
83
|
This will do the same as the CLI example above.
|
|
83
84
|
|
|
85
|
+
# Usage with GitHub Actions
|
|
86
|
+
|
|
87
|
+
You can use `autorel` with GitHub Actions to automate your releases (recommended).
|
|
88
|
+
|
|
89
|
+
> ❗️ You must set `fetch-depth: 0` and `fetch-tags: true` in `actions/checkout@v4` to ensure that all tags are fetched.
|
|
90
|
+
|
|
91
|
+
> ❗️ You must be authenticated with NPM to publish. To do so via GitHub Actions, see [this](https://docs.github.com/en/actions/guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry).
|
|
92
|
+
|
|
93
|
+
Here is a sample configuration:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
name: Release
|
|
97
|
+
on:
|
|
98
|
+
push:
|
|
99
|
+
branches: [main, alpha, beta]
|
|
100
|
+
jobs:
|
|
101
|
+
release:
|
|
102
|
+
name: Release
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
steps:
|
|
105
|
+
- uses: actions/checkout@v4
|
|
106
|
+
with:
|
|
107
|
+
fetch-depth: 0
|
|
108
|
+
fetch-tags: true
|
|
109
|
+
- uses: actions/setup-node@v4
|
|
110
|
+
with:
|
|
111
|
+
node-version: latest
|
|
112
|
+
registry-url: "https://registry.npmjs.org"
|
|
113
|
+
cache: 'npm'
|
|
114
|
+
- uses: actions/cache@v3
|
|
115
|
+
id: cache-node-modules
|
|
116
|
+
with:
|
|
117
|
+
path: node_modules
|
|
118
|
+
key: ${{runner.os}}-node-${{hashFiles('package-lock.json')}}
|
|
119
|
+
- run: npm ci
|
|
120
|
+
- run: npm run lint
|
|
121
|
+
- run: npm run test
|
|
122
|
+
- env:
|
|
123
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
124
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
125
|
+
run: npx autorel --publish
|
|
126
|
+
```
|
|
127
|
+
|
|
84
128
|
# Configuration
|
|
85
129
|
|
|
86
130
|
When run in CLI mode, `autorel` can be configured via CLI arguments or a `yaml` file. CLI arguments take precedence over the `yaml` file.
|
|
@@ -91,12 +135,6 @@ All arguments are optional, but setting `branches` is recommended.
|
|
|
91
135
|
|
|
92
136
|
> ❗️ The `yaml` configuration file must be named `.autorel.yml` and be in the root of your project.
|
|
93
137
|
|
|
94
|
-
## help (CLI only)
|
|
95
|
-
|
|
96
|
-
Man page for the CLI
|
|
97
|
-
|
|
98
|
-
- CLI: `--help`
|
|
99
|
-
|
|
100
138
|
## publish
|
|
101
139
|
|
|
102
140
|
Whether to publish the release to NPM. If `true`, you must be authenticated with NPM. To do so via GitHub Actions, see [this](https://docs.github.com/en/actions/guides/publishing-nodejs-packages#publishing-packages-to-the-npm-registry).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autorel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
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)",
|