Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chlbri/publish-npm-command-action
generate command for public action on npm
https://github.com/chlbri/publish-npm-command-action
github-action npm
Last synced: about 1 month ago
JSON representation
generate command for public action on npm
- Host: GitHub
- URL: https://github.com/chlbri/publish-npm-command-action
- Owner: chlbri
- License: mit
- Created: 2022-12-26T18:25:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-07T11:26:35.000Z (over 1 year ago)
- Last Synced: 2024-11-16T06:19:02.450Z (2 months ago)
- Topics: github-action, npm
- Language: TypeScript
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Generates a npm command and change package version
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.
## Input Parameters
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 |
## Output Variables
npm-publish-command exposes the generated command and the version created.
```yaml
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 |