Files
publish-immutable-action/generate-new-version.sh
T
2024-01-26 13:03:16 -05:00

27 lines
600 B
Bash
Executable File

#!/bin/bash
VERSION=$1
MESSAGE=$2
if [ -z "$VERSION" ]
then
echo "No version supplied"
exit 1
fi
if [ -z "$MESSAGE" ]
then
echo "No message supplied"
exit 1
fi
echo "Generating new version $VERSION with message $MESSAGE"
#sed -i '' -E 's/ddivad195\/publish-action-package\/package-and-publish.*$/ddivad195\/publish-action-package\/package-and-publish@'$VERSION'/g' action.yml
npm run bundle
git add .
git commit -m "$VERSION: $MESSAGE"
git push
git tag $VERSION
git push origin $VERSION
gh release create --repo ddivad195/publish-action-package --title $VERSION --notes $VERSION $VERSION