GitHub Action
Release Check
Check if a push or pull request should trigger a release.
This action is a handy helper for checking if a change should lead to a release. The action checks if the changes affect the code base of the business logic or if only package logistics are affected. The action helps to keep unnecessary releases low if one uses automatic releases through github actions. This action is designed to work with dependabot
updates
The release-check
answers two questions.
- Have changed only files in protected paths?
- Have changed only development dependencies?
If the answers to these questions are true, then no release is necessary.
release-check
uses Octokit
for comparing the changes. You don't need to check out the repository.
The default protected paths are:
.github
.gitignore
tests/
test/
package-lock.json
package.json
It is possible to add additional paths through the protected-paths
input.
Optional A list of protected paths that don't contain any business logic that would result into a release. Examples for such protected paths are the .gitignore
file or the .github
directories.
Boolean: is set to true, if the changes affect non-protected paths or upstream dependencies
Boolean: is set to true, if the changes affect only development dependencies (devDependencies
in package.json
).
Boolean: is set to true, if the changes affect only changes in protected paths. It is false, if only upstream dependencies in package.json have changed.
name: Release Action
on:
- push
- pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- id: release
uses: phish108/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ steps.release.outputs.proceed }}
uses: phish108/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}