Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rdeak/semantic-release-action
Github action for creating release with semantic-release npm package
https://github.com/rdeak/semantic-release-action
Last synced: about 1 month ago
JSON representation
Github action for creating release with semantic-release npm package
- Host: GitHub
- URL: https://github.com/rdeak/semantic-release-action
- Owner: rdeak
- License: mit
- Created: 2024-05-21T11:11:27.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-22T14:31:58.000Z (7 months ago)
- Last Synced: 2024-05-22T17:04:16.566Z (7 months ago)
- Language: JavaScript
- Size: 10.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Semantic Release Action
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
This action creates release with changelog, and if NPM_TOKEN is set it publishes package to NPM.
## Inputs
| Name | Required | Description |
|--------------|----------|----------------------------------|
| GITHUB_TOKEN | Yes | It's needed to push version tag. |
| NPM_TOKEN | | Valid NPM token |## Outputs
| Name | Description |
|-----------------------|------------------------------------------|
| new_release_created | Flag if new release created (true/false) |
| release_version | Latest released version eg. 1.0.1 |
| release_major_version | Latest major version eg. 1 |
| release_tag | Latest version tag eg. v1.0.1 |## Environment variables
| Name | Description |
|-----------------------|------------------------------------------|
| NEW_RELEASE_CREATED | Flag if new release created (true/false) |
| RELEASE_VERSION | Latest released version eg. 1.0.1 |
| RELEASE_MAJOR_VERSION | Latest major version eg. 1 |
| RELEASE_TAG | Latest version tag eg. v1.0.1 |## Example usage
```yaml
name: Release
on:
push:
branches:
- main
jobs:
Release:
runs-on: ubuntu-latest
permissions:
contents: write # without it release and tag can't be created
steps:
uses: rdeak/semantic-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```To create release tag and publish dist to NPM
```yaml
name: Release
on:
push:
branches:
- main
jobs:
Release:
runs-on: ubuntu-latest
permissions:
contents: write # without it release and tag can't be created
steps:
uses: rdeak/semantic-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN
```## License
This project is licensed under the terms of the MIT license.