For commit publishing. It looks at your commit, change your package version with the start of your commit subject ("major", "minor", "patch"). Also the action generates a npm publish command for beta an aplha version. Also at the beginning of your last commit, if you write "beta" or "alpha", it will generate "npm publish --access public --{beta/alpha}".
NB: Don't forget to configure your CI environment with actions/setup according to your will.
You can set any or all of the following input parameters :
Name | Type | Default | Description |
---|---|---|---|
path |
string | optional | The package.json file path. (absolute). Use process.cwd |
npm-publish-command exposes the generated command and the version created.
steps:
- id: publish
uses: bemedev/[email protected]
with:
path: ./package.test.json
- Show version
run: |
echo "Version changed: ${{ steps.publish.outputs.version }}"
- Show command
run: |
echo "The generated npm command: ${{ steps.publish.outputs.command }}"
Variable | Type | Description |
---|---|---|
command |
string | The command to excute |
version |
string | The version of the package |