https://github.com/lumakernel/npm-release-pack-action
Publish npm package if needed, and create GitHub actions release with tagged as released version.
https://github.com/lumakernel/npm-release-pack-action
Last synced: 3 months ago
JSON representation
Publish npm package if needed, and create GitHub actions release with tagged as released version.
- Host: GitHub
- URL: https://github.com/lumakernel/npm-release-pack-action
- Owner: LumaKernel
- License: mit
- Created: 2022-02-10T09:13:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-10T10:14:05.000Z (over 3 years ago)
- Last Synced: 2025-03-15T07:03:18.538Z (3 months ago)
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/npm-release-pack
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NPM Release Pack Action
GitHub Action for:
1. Publish npm package if needed. Necessity is decided by running real publish command.
2. If not published, end action successfully.
3. Create GitHub actions release.## Usage
```yml
- if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
name: Configure npm token
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
- if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
uses: LumaKernel/[email protected]
with:
github_token: ${{ github.token }}
# repository: '' # optional
# working_directory: '.' # optional
publish_command: 'npm publish --access public'
# publish_command: 'npm publish --access public'
# publish_command: 'yarn publish --access public'
# publish_command: 'pnpm publish --access public'
# version_tag_pattern: 'v%s' # optional
# release_name_pattern: 'v%s' # optional
# release_body: # optional
# draft: # optional, boolean
# prerelease: # optional, boolean
# generate_release_notes: # optional, boolean
# discussion_category_name: # optional, boolean
```## Options
GitHub Release related options(`release_body`, `draft`, `prerelease`, `generate_release_notes`, `discussion_category_name`) are documented in https://docs.github.com/en/rest/reference/releases#create-a-release .
name|description
--|--
`github_token` \*|GitHub token.
`publish_command` \*|Command to publish to npm. It should fail if publication is not needed. Run with bash.
`repository`|GitHub repository name.
`working_directory`|Directory to publish.## Examples
- https://github.com/LumaKernel/changeset-single
## Credits
- This repository is based on:
- https://github.com/ad-m/github-push-action