Files
publish-immutable-action/generate-new-version.sh
T

25 lines
557 B
Bash
Raw Normal View History

2024-01-24 11:01:54 -05:00
#!/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"
2024-01-24 11:03:20 -05:00
sed -i '' -E 's/ddivad195\/publish-action-package\/package-and-publish.*$/ddivad195\/publish-action-package\/package-and-publish@'$VERSION'/g' action.yml
2024-01-24 11:01:54 -05:00
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