Skip to content

Commit

Permalink
Merge pull request #28 from conjikidow/feature/update-readme
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
conjikidow authored Feb 24, 2025
2 parents 5386d00 + 11d6b54 commit 62f8981
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,21 @@ Once the version bump PR is merged, it automatically creates a new tag for the b

### Workflow Example

Add the following workflow to your repository to automatically bump the version when a PR is merged. Save it as `.github/workflows/bump-version.yaml`, for example.
Below is an example workflow you can add to your repository to automatically bump the version when a pull request is merged.
You can save it in a file such as `.github/workflows/bump-version.yaml`.

Make sure your workflow includes the following:

- The `on: pull_request: types: [closed]` trigger to run the workflow whenever a pull request is closed.
- The condition `if: github.event.pull_request.merged == true` to ensure the workflow only proceeds if the pull request was merged.
- The permissions under `permissions:` to allow the workflow to update repository contents and pull requests.

```yaml
name: "Bump Version"

on:
pull_request:
types:
- closed
types: [closed]

jobs:
bump-version:
Expand All @@ -34,6 +40,9 @@ jobs:
steps:
- uses: conjikidow/bump-version@v1
with:
label-major: "major update"
label-minor: "minor update"
label-patch: "patch update"
labels-to-add: "automated,version-bump"
```
Expand All @@ -48,6 +57,8 @@ jobs:
| `label-patch` | The label used to trigger a patch version bump | No | `"update::patch"` |
| `labels-to-add` | The labels to add to the PR for version bumping | No | None |

> **Note:** Any labels specified in `labels-to-add` must already exist in your repository. If they do not, create them in advance to avoid errors.

### bump-my-version Configuration

To use this action, ensure that your project is configured to work with `bump-my-version`.
Expand Down Expand Up @@ -126,3 +137,8 @@ In addition to the full version tag (`vX.Y.Z`), this action updates existing maj
- `v1.2.3 → v1.2.4`: Update `v1.2` and `v1` if they exist.
- `v1.2.3 → v1.3.0`: Create `v1.3` if `v1.2` exists, update `v1` if it exists.
- `v1.2.3 → v2.0.0`: Create `v2.0` if `v1.2` exists, create `v2` if `v1` exists.

## Contributing & Feedback

Contributions, bug reports, and feedback are always welcome!
Thank you for helping improve this project for everyone!

0 comments on commit 62f8981

Please sign in to comment.