Merge pull request #51 from thedigbee/fix/skip-on-empty-docs-say-it-defaults-to-false

Changed 'skip-on-empty' default in README
releases/v3
Tycho Bokdam 2020-08-11 08:17:35 +02:00 committed by GitHub
commit 954151c5e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 10 deletions

View File

@ -15,7 +15,7 @@ This action will bump version, tag commit and generate a changelog with conventi
- **Optional** `release-count`: Number of releases to preserve in changelog. Default `5`, use `0` to regenerate all. - **Optional** `release-count`: Number of releases to preserve in changelog. Default `5`, use `0` to regenerate all.
- **Optional** `version-file`: The path to the file that contains the version to bump. Default `./package.json`. - **Optional** `version-file`: The path to the file that contains the version to bump. Default `./package.json`.
- **Optional** `version-path`: The place inside the version file to bump. Default `version`. - **Optional** `version-path`: The place inside the version file to bump. Default `version`.
- **Optional** `skip-on-empty`: Boolean to specify if you want to skip empty release (no-changelog generated). This case occured when you push `chore` commit with `angular` for example. Default `'false'`. - **Optional** `skip-on-empty`: Boolean to specify if you want to skip empty release (no-changelog generated). This case occured when you push `chore` commit with `angular` for example. Default `'true'`.
- **Optional** `skip-version-file`: Do not update the version file. Default `'false'`. - **Optional** `skip-version-file`: Do not update the version file. Default `'false'`.
- **Optional** `skip-commit`: Do create a release commit. Default `'false'`. - **Optional** `skip-commit`: Do create a release commit. Default `'false'`.
- **Optional** `pre-commit`: Path to the pre-commit script file. No hook by default. - **Optional** `pre-commit`: Path to the pre-commit script file. No hook by default.
@ -29,6 +29,7 @@ This action will bump version, tag commit and generate a changelog with conventi
Specified path could be relative or absolute. If it is relative, then it will be based on the `GITHUB_WORKSPACE` path. Specified path could be relative or absolute. If it is relative, then it will be based on the `GITHUB_WORKSPACE` path.
Script should: Script should:
- be a CommonJS module - be a CommonJS module
- have a single export: `exports.preCommit = (props) => { /* ... */ }` - have a single export: `exports.preCommit = (props) => { /* ... */ }`
- not have any return value - not have any return value
@ -96,7 +97,7 @@ No file changelog
uses: TriPSs/conventional-changelog-action@v3 uses: TriPSs/conventional-changelog-action@v3
with: with:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
output-file: 'false' output-file: "false"
``` ```
Tag only Tag only
@ -106,7 +107,7 @@ Tag only
uses: TriPSs/conventional-changelog-action@v3 uses: TriPSs/conventional-changelog-action@v3
with: with:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
skip-commit: 'true' skip-commit: "true"
``` ```
Use a custom file for versioning Use a custom file for versioning
@ -116,7 +117,7 @@ Use a custom file for versioning
uses: TriPSs/conventional-changelog-action@v3 uses: TriPSs/conventional-changelog-action@v3
with: with:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
version-file: 'my-custom-file.yaml' version-file: "my-custom-file.yaml"
``` ```
Use a pre-commit hook Use a pre-commit hook
@ -137,24 +138,26 @@ Github releases
uses: TriPSs/conventional-changelog-action@v3 uses: TriPSs/conventional-changelog-action@v3
with: with:
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
output-file: 'false' output-file: "false"
skip-on-empty: 'true'
- name: Create Release - name: Create Release
uses: actions/create-release@v1 uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }} if: ${{ steps.changelog.outputs.skipped == 'false' }}
env: env:
GITHUB_TOKEN: ${{ secrets.github_token }} GITHUB_TOKEN: ${{ secrets.github_token }}
with: with:
tag_name: ${{ steps.changelog.outputs.tag }} tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }} release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }} body: ${{ steps.changelog.outputs.clean_changelog }}
``` ```
## Development ## Development
If you'd like to contribute to this project, all you need to do is clone and install [act](https://github.com/nektos/act) this project and run: If you'd like to contribute to this project, all you need to do is clone and install [act](https://github.com/nektos/act) this project and run:
> Make sure that `main: 'src/index.js'` is updated to `main: '../src/index.js'` inside the `action.yml` > Make sure that `main: 'src/index.js'` is updated to `main: '../src/index.js'` inside the `action.yml`
> Note: The image used is 18 gb! > Note: The image used is 18 gb!
```shell ```shell
$ yarn install $ yarn install