autorel 2.0.2 → 2.0.4

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.
Files changed (2) hide show
  1. package/README.md +33 -20
  2. 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
- > ❗️ 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)
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).
@@ -125,31 +140,21 @@ jobs:
125
140
  - run: npm ci
126
141
  - run: npm run lint
127
142
  - run: npm run test
128
- - env:
129
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
130
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
131
- run: npx autorel --publish
143
+ - run: npx autorel --publish
144
+ env:
145
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
146
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
132
147
  ```
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.
151
154
 
152
- Simply use the `--no-release` flag (arg: `noRelease: true`) to skip creating a release on GitHub. Then, you can use either the `--run` flag (arg: `run: string`) or `runScript` arg to run any command or script after the version bump with the new version number available as an environment variable [see below](#run).
155
+ Simply use the `--skip-release` flag (arg: `skipRelease: true`) to skip creating a release on GitHub. Then, you can use either the `--run` flag (arg: `run: string`) or `runScript` arg to run any command or script after the version bump with the new version number available as an environment variable [see below](#run).
156
+
157
+ If you're interested in contributing built-in support for other systems, please open an issue or PR.
153
158
 
154
159
  # Usage with Other Languages (not Node.js)
155
160
 
@@ -157,9 +162,13 @@ Simply use the `--no-release` flag (arg: `noRelease: true`) to skip creating a r
157
162
 
158
163
  Simply omit the `--publish` flag (arg: `publish: false`, which is default) to skip publishing to NPM. Then, you can use either the `--run` flag (arg: `run: string`) or `runScript: string` arg to run any command or script after the version bump with the new version number available as an environment variable [see below](#run).
159
164
 
165
+ If you're interested in contributing built-in support for other systems, please open an issue or PR.
166
+
160
167
  # Configuration
161
168
 
162
- 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.
163
172
 
164
173
  When used as a library, you can pass the configuration directly to the `autorel` function.
165
174
 
@@ -309,6 +318,10 @@ AUTOREL_DEBUG=1 npx autorel
309
318
 
310
319
  This will output configuration and other debug information.
311
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
+
312
325
  # Support, Feedback, and Contributions
313
326
 
314
327
  - Star this repo if you like it!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autorel",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
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)",