fix(template): trying a tag push

This commit is contained in:
D. Moonfire 2022-09-05 16:56:41 -05:00
parent f3b18dc54a
commit 4093d9c0cb

View file

@ -35,14 +35,16 @@ dotnet nuget add source --name mfgames --username dmoonfire --password $GITEA_TO
echo "$(basename $0): publishing NuGet package"
dotnet pack --include-symbols --include-source || exit 1
dotnet nuget push --source mfgames src/*/bin/Debug/*.nupkg || exit 1
dotnet nuget push --source mfgames src/*/bin/Debug/*nupkg || exit 1
# Tag and push, but only if we don't have a tag.
if ! git tag | grep $SEMVER >& /dev/null
then
echo "$(basename $0): tagging and pushing"
git remote add publish https://dmoonfire:$GITEA_TOKEN@src.mfgames.com/mfgames-cil/$(basename $(git config --get remote.origin.url))
git tag $SEMVER
git push origin $SEMVER
git push publish $SEMVER || exit 1
git remote remove publish
else
echo "$(basename $0): not tagging, already exists"
fi