Skip to content

Commit

Permalink
Added default bump label configuration (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thejus-Paul authored Mar 12, 2023
1 parent eda5b13 commit eddd2a9
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 309 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,50 @@ The GitHub action to bump the gem or engine version from the pull request labels

**Optional** The pull request body to use. Default `"New version release"`.

### `default_bump_label`

**Optional** Provide a default bump label for cases when labels does not include a bump type label.

```yaml
- name: Bump gem version
uses: Thejus-Paul/bump-gem-action@main
with:
labels: ${{ join(github.event.pull_request.labels.*.name, ',') }}
token: ${{ secrets.GITHUB_TOKEN }}
default_bump_label: patch
```
## Example usage
```yaml
- name: Bump gem version
uses: Thejus-Paul/bump-gem-action@main
with:
labels: ${{ join(github.event.pull_request.labels.*.name, ',') }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Bump gem version
uses: Thejus-Paul/bump-gem-action@main
with:
labels: ${{ join(github.event.pull_request.labels.*.name, ',') }}
token: ${{ secrets.GITHUB_TOKEN }}
```
## Local development
1. Install the dependencies
```bash
npm install
pnpm install
```

2. Make the necessary changes to `action.yml` and/or `index.js`.

3. Compile the `index.js` with the dependencies into a single file.

```bash
npm run build
pnpm run build
```

4. Commit the changes and push to the branch.

```bash
git add .
git commit -m "Commit message"
git tag -a v1.0.0 -m "v1.0.0"
git tag -s -a v1.0.0 -m "v1.0.0"
git push --follow-tags
```
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ inputs:
description: 'Provide a body for the PR.'
required: false
default: 'New version release'
default_bump_label:
description: 'Provide a default bump label for cases when labels does not include a bump type label'
required: false
runs:
using: 'node16'
main: 'dist/index.js'
Expand Down
Binary file modified dist/index.js.cache
Binary file not shown.
4 changes: 2 additions & 2 deletions dist/index.js.cache.js

Large diffs are not rendered by default.

287 changes: 0 additions & 287 deletions package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bump-gem-action",
"version": "1.1.2",
"version": "1.1.3",
"description": "The GitHub action to bump the gem or engine version.",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit eddd2a9

Please sign in to comment.