Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# bump-version-action
GitHub action to bump a semantic version
# Bump Version

A GitHub Action to bump a given version number.

## Inputs

```yaml
inputs:
version:
description: The current semantic version number.
required: true
release-type:
description: Type of release. Must be one of `patch` | `minor` | `major`.
required: true
```

## Outputs

```yaml
outputs:
version:
description: The new version number.
major-version:
description: The major version number.
```

## Example Usage

```yaml
- uses: uses: Mobelux/bump-version-action@v1
id: bump
with:
version: `1.0.0'
release-type: 'minor'
```

## Acknowledgments

Uses [semver-tool](https://github.com/fsaintjacques/semver-tool)
37 changes: 37 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Bump Version
author: Mobelux
description: Bumps a given version number.

inputs:
version:
description: The current semantic version number.
required: true
release-type:
description: Type of release. Must be one of `patch` | `minor` | `major`.
required: true

outputs:
version:
description: The new version number.
value: ${{ steps.bump.outputs.new-version }}
major-version:
description: The major version number.
value: ${{ steps.major-version.outputs.major-version }}

runs:
using: composite
steps:
- name: Bump Version
id: bump
shell: bash
run: |
echo "new-version=$( ${{ github.action_path }}/semver.sh bump ${{ inputs.release-type }} ${{ inputs.version }} )" >> $GITHUB_OUTPUT
- name: Get Major Version
id: major-version
shell: bash
run: |
echo "major-version=$( ${{ github.action_path }}/semver.sh get major ${{ steps.bump.outputs.new-version }} )" >> $GITHUB_OUTPUT

branding:
icon: 'triangle'
color: 'orange'
Loading