GitHub Action
Release Action
GitHub Action to automatically release packages using lerna or semantic-release.
- Automatically bump packages version using semantic-release (or lerna which also relies on semantic-release)
- Create releases on GitHub
- Publish to GitHub and NPM registries
Publishing 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.
Publishing on NPM registry is skipped if no NPM token is provided.
In .github/workflows/release.yml
:
on:
push:
branches:
- main
jobs:
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 }}
string
(required)
GitHub Token used to create the release on GitHub and publish on GitHub registry.
string
(optional)
NPM token with publish permission. If not provided, publishing to npm registry will be skipped.
boolean
(optional, default true
)
Enable or disable publishing to package registries. When set to false, only releases are created on GitHub.
boolean
(optional, default true
)
Enable or disable pushing changes made by the action.
string
(optional, default: 'github-actions[bot]'
)
User name to use when pushing to GitHub.
string
(optional, default: 'github-actions[bot]@users.noreply.github.com'
)
Email to use when pushing to GitHub.
string
(optional, default: 'ci: release'
)
Commit message to use when bumping package.json.