mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
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:
@@ -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
|
||||
...
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user