Compare commits

..

8 Commits

Author SHA1 Message Date
bryce 49745e6d29 test
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-05-27 13:51:12 -06:00
bryce 2d41ba3b7d a
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-05-27 13:39:24 -06:00
bryce da868d894b test
Push to main / Reset-Version-Tag (push) Successful in 7s
2026-05-27 13:31:01 -06:00
bryce 6e2ea2c2ad test
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-05-27 13:28:35 -06:00
bryce 0902f0bb51 fix
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-05-27 13:22:55 -06:00
bryce d6b52654ac remove comment
Push to main / Reset-Version-Tag (push) Successful in 6s
2026-05-27 13:18:25 -06:00
bryce 9937880c5c fix 2026-05-27 13:17:06 -06:00
bryce 0682d66f77 allow override and prefix 2026-05-27 13:11:54 -06:00
2 changed files with 17 additions and 7 deletions
+11 -6
View File
@@ -2,17 +2,22 @@ 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)
echo $CURRENT_VERSION
CURRENT_VERSION=$INPUT_PREFIX$(jq -r .version package.json)
COMMIT_ID=$(git rev-parse --short HEAD)
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
if [[ $PREVIOUS_VERSIONS != *$CURRENT_VERSION* ]];
then
echo "Tag for version $CURRENT_VERSION not found. Creating tag..."
git tag -a -m "Version $CURRENT_VERSION" $CURRENT_VERSION
git push --follow-tags
git tag -a $CURRENT_VERSION -m "Version $CURRENT_VERSION" $COMMIT_ID
git push origin --tags
echo "Tag created."
fi
# a change
+6 -1
View File
@@ -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: