Skip to content

Commit

Permalink
Add "description" input parameter (#2)
Browse files Browse the repository at this point in the history
Allows you to edit the release description.
  • Loading branch information
kslr authored and EndBug committed Nov 28, 2019
1 parent a487018 commit 0a1bf03
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ If you want to use the **latest** release of an action you can only hope authors

That's why I made this action: if you're the kind of guy that doesn't like to update tags you can simply use this action and forget about it. You can just put `latest` in the documentation: your users will get the benefits of using a branch as ref and the security of using only stable versions.

## Input parameters

These are the parameters you can use with the action:

- `description`: [optional] Description for the release

## Usage

You can use a workflow like this:
Expand All @@ -28,6 +34,8 @@ jobs:

- name: Run latest-tag
uses: EndBug/latest-tag@latest
with:
description: Description for the release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
```
Expand All @@ -39,4 +47,4 @@ With that said, you can just copy the example line and don't worry about it. If

## License

This action is distributed under the MIT license, check the [license](LICENSE) for more info.
This action is distributed under the MIT license, check the [license](LICENSE) for more info.
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ runs:

branding:
icon: tag
color: blue
color: blue

inputs:
description:
description: 'Description for the release'
required: false
default: 'This tag has been auto-generated by latest-tag'
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ echo "Setting up git machine..."
git_setup

echo "Forcing tag update..."
git tag -a latest -m "This tag has been auto-generated by latest-tag" "${GITHUB_SHA}" -f
git tag -a latest -m "$INPUT_DESCRIPTION" "${GITHUB_SHA}" -f

echo "Forcing tag push..."
git push --tags -f
git push --tags -f

0 comments on commit 0a1bf03

Please sign in to comment.