Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6b52654ac | |||
| 9937880c5c | |||
| 0682d66f77 |
@@ -2,8 +2,16 @@ apt update
|
||||
apt install jq -y
|
||||
git config --global user.email "cloud+git+runner@thorup.us"
|
||||
git config --global user.name "Git runner"
|
||||
CURRENT_VERSION=$(jq -r .version package.json)
|
||||
CURRENT_VERSION=$INPUT_PREFIX$(jq -r .version package.json)
|
||||
echo $CURRENT_VERSION
|
||||
git checkout $CURRENT_VERSION
|
||||
|
||||
if [[ $INPUT_FORCE_OVERRIDE == true ]];
|
||||
then
|
||||
git tag -d $CURRENT_VERSION || true
|
||||
git push --delete origin $CURRENT_VERSION || true
|
||||
fi
|
||||
|
||||
PREVIOUS_VERSIONS=$(git tag -l)
|
||||
echo $PREVIOUS_VERSIONS
|
||||
|
||||
@@ -14,5 +22,3 @@ then
|
||||
git push --follow-tags
|
||||
echo "Tag created."
|
||||
fi
|
||||
|
||||
# a change
|
||||
+6
-1
@@ -1,6 +1,11 @@
|
||||
name: version-tag
|
||||
description: "Creates a version tag when the 'version' value in 'package.json' has changed and a tag with the version number does not already exist."
|
||||
description: "Creates a version tag when the 'version' value in 'package.json' has changed and a tag with the version number (including optional prefix) does not already exist."
|
||||
author: "Bryce Thorup"
|
||||
inputs:
|
||||
prefix:
|
||||
description: Prefix to be added to version tag
|
||||
force_override:
|
||||
description: Allows an existing tag to be overridden if set to "true"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user