autorel 2.6.18 → 2.6.19

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 +6 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -229,15 +229,17 @@ jobs:
229
229
 
230
230
  ### Using `--run` with the version in GitHub Actions
231
231
 
232
- **Only if you put `NEXT_VERSION` or `NEXT_TAG` in your `--run` command** (e.g. as an argument to your script), use a double dollar so the version is passed through. For example:
232
+ When passing `$NEXT_VERSION` or `$NEXT_TAG` in your `--run` command, wrap the `--run` argument in **single quotes** so the shell doesn't expand the variable before autorel has a chance to set it:
233
233
 
234
234
  ```yaml
235
- - run: npx autorel@^2 --publish --run "deploy-service $$NEXT_VERSION"
235
+ - run: npx autorel@^2 --publish --run 'deploy-service $NEXT_VERSION'
236
236
  ```
237
237
 
238
- In Actions the step `run:` is expanded by the runner *before* autorel runs, so a single `$` would be expanded when the variable is still unset. `$$` becomes a literal `$`, so the shell that runs your script gets `$NEXT_VERSION` after autorel has set it.
238
+ With single quotes, `$NEXT_VERSION` is passed as a literal string to autorel. Autorel sets the environment variable and then executes your command in a sub-shell where it resolves correctly.
239
239
 
240
- You can also use `.autorel.yaml` or a script (e.g. `--run "./blah.sh"`); they run in a shell where the version is already set, so `$NEXT_VERSION` / `$NEXT_TAG` work as usual. `NEXT_TAG` is also available (e.g. for Docker tags that use `v`).
240
+ > ⚠️ **Do not use double quotes** around the `--run` argument the shell would expand `$NEXT_VERSION` to an empty string before autorel runs.
241
+
242
+ You can also use `.autorel.yaml` or a wrapper script (e.g. `--run "./deploy.sh"`); they run in a shell where the version is already set, so `$NEXT_VERSION` / `$NEXT_TAG` work as usual.
241
243
 
242
244
  ## Authentication & Permissions
243
245
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autorel",
3
- "version": "2.6.18",
3
+ "version": "2.6.19",
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)",