Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plutotcool/release
🔖 - GitHub Action to automatically release packages using lerna or semantic-release
https://github.com/plutotcool/release
actions github-actions lerna release semantic-release
Last synced: 2 months ago
JSON representation
🔖 - GitHub Action to automatically release packages using lerna or semantic-release
- Host: GitHub
- URL: https://github.com/plutotcool/release
- Owner: plutotcool
- License: mit
- Created: 2020-11-23T18:44:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-20T11:20:19.000Z (about 3 years ago)
- Last Synced: 2024-09-27T22:36:07.329Z (3 months ago)
- Topics: actions, github-actions, lerna, release, semantic-release
- Language: TypeScript
- Homepage:
- Size: 168 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Release Action
> GitHub Action to automatically release packages using lerna or semantic-release.
- Automatically bump packages version using [semantic-release](https://github.com/semantic-release/semantic-release) (or [lerna](https://github.com/lerna/lerna) which also relies on semantic-release)
- Create releases on GitHub
- Publish to GitHub and NPM registriesPublishing on package registries is skipped if there is not any `package.json` or if its `private` field is set to true.
Publishing on GitHub registry is skipped if the package name is not [scoped with the GitHub owner name](https://docs.github.com/en/free-pro-team@latest/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#publishing-a-package).
Publishing on NPM registry is skipped if no [NPM token](https://docs.npmjs.com/about-access-tokens) is provided.
## Usage
In `.github/workflows/release.yml`:
```yaml
on:
push:
branches:
- mainjobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- run: yarn
- run: yarn build
- uses: plutotcool/release@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_TOKEN }}
```## Inputs
### `github_token`
`string` *(required)*
[GitHub Token](https://docs.github.com/en/free-pro-team@latest/actions/reference/authentication-in-a-workflow#about-the-github_token-secret) used to create the release on GitHub and publish on GitHub registry.
### `npm_token`
`string` *(optional)*
[NPM token](https://docs.npmjs.com/about-access-tokens) with publish permission. If not provided, publishing to npm registry will be skipped.
### `publish`
`boolean` *(optional, default `true`)*
Enable or disable publishing to package registries. When set to false, only releases are created on GitHub.
### `push`
`boolean` *(optional, default `true`)*
Enable or disable pushing changes made by the action.
## `name`
`string` *(optional, default: `'github-actions[bot]'`)*
User name to use when pushing to GitHub.
## `email`
`string` *(optional, default: `'github-actions[bot]@users.noreply.github.com'`)*
Email to use when pushing to GitHub.
## `message`
`string` *(optional, default: `'ci: release'`)*
Commit message to use when bumping package.json.