Files
publish-immutable-action/generate-new-version.sh
T
2024-01-26 16:34:39 +00:00

25 lines
557 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
gh release create --repo ddivad195/publish-action-package --title $VERSION --notes $VERSION $VERSION