Require @changesets/cli resolving from cwd (#67)

* Resolve @changesets/cli with resolve-from

* Use require.resolve directly

* Add documentation section to README

* Add custom version command docs for Yarn 2
This commit is contained in:
Jacob Gillespie
2021-02-15 18:51:03 +01:00
committed by GitHub
parent b3300fad33
commit bf4c612018
3 changed files with 22 additions and 10 deletions
+11 -2
View File
@@ -4,7 +4,6 @@ This action for [Changesets](https://github.com/atlassian/changesets) creates a
## Usage
### Inputs
- publish - The command to use to build and publish packages
@@ -101,7 +100,6 @@ jobs:
if: steps.changesets.outputs.published == 'true'
# You can do something when a publish happens.
run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"
```
By default the GitHub Action creates a `.npmrc` file with the following content:
@@ -164,3 +162,14 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
#### With Yarn 2 / Plug'n'Play
If you are using [Yarn Plug'n'Play](https://yarnpkg.com/features/pnp), you should use a custom `version` command so that the action can resolve the `changeset` CLI:
```yaml
- uses: changesets/action@master
with:
version: yarn changeset version
...
```