Skip to content

Commit

Permalink
feat: support setting prefixes when running the GitHub action (#101)
Browse files Browse the repository at this point in the history
* feat: support setting prefixes when running the GitHub action

* Update entrypoint.sh

---------

Co-authored-by: Golo Roden <golo.roden@thenativeweb.io>
  • Loading branch information
matthiashermsen and goloroden committed Aug 9, 2023
1 parent c270364 commit 777af3a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ jobs:
- name: Get next version
id: get_next_version
uses: thenativeweb/get-next-version@main
with:
prefix: 'v' # optional, defaults to ''
- name: Show the next version
run: |
echo ${{ steps.get_next_version.outputs.version }}
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: 'get-next-version'
description: >
Gets the next version for your repository according to
semantic versioning based on conventional commits.
inputs:
prefix:
description: 'Sets the version prefix'
required: false
default: ''
outputs:
version:
description: 'Next version'
Expand Down
5 changes: 5 additions & 0 deletions action.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: 'get-next-version'
description: >
Gets the next version for your repository according to
semantic versioning based on conventional commits.
inputs:
prefix:
description: 'Sets the version prefix'
required: false
default: ''
outputs:
version:
description: 'Next version'
Expand Down
3 changes: 2 additions & 1 deletion action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ set -e

/action/get-next-version \
--repository /github/workspace \
--target github-action
--target github-action \
--prefix "$INPUT_PREFIX"

0 comments on commit 777af3a

Please sign in to comment.