autorel 0.0.28 → 0.0.29

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 +44 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -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)
@@ -81,6 +82,49 @@ autorel --publish
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.28",
3
+ "version": "0.0.29",
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)",