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=$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 $CURRENT_VERSION -m "Version $CURRENT_VERSION" $COMMIT_ID git push origin --tags echo "Tag created." fi