Compare commits

...

2 Commits

Author SHA1 Message Date
Patrick Stevens
a2ad430b2f Fix end-of-line config (#109) 2024-02-26 18:33:29 +00:00
Patrick Stevens
9e36986bc7 Fix GitHub releases process (#108) 2024-02-25 11:57:55 +00:00
3 changed files with 14 additions and 7 deletions

View File

@@ -2,7 +2,6 @@ root=true
[*]
charset=utf-8
end_of_line=crlf
trim_trailing_whitespace=true
insert_final_newline=true
indent_style=space

10
.gitattributes vendored
View File

@@ -1,5 +1,5 @@
* eol=auto
*.sh text eol=lf
*.yaml text
*.nix text eol=lf
hooks/pre-push text eol=lf
* eol=auto
*.sh text eol=lf
*.yaml text
*.nix text eol=lf
hooks/pre-push text eol=lf

View File

@@ -3,7 +3,15 @@
find . -maxdepth 1 -type f -name '*.nupkg' -exec sh -c 'tag=$(basename "$1" .nupkg); git tag "$tag"; git push origin "$tag"' shell {} \;
export TAG
TAG=$(find . -maxdepth 1 -type f -name 'WoofWare.Myriad.Plugins.*.nupkg' -exec sh -c 'basename "$1" .nupkg' shell {} \;)
TAG=$(find . -maxdepth 1 -type f -name 'WoofWare.Myriad.Plugins.*.nupkg' -exec sh -c 'basename "$1" .nupkg' shell {} \; | grep -v Attributes)
case "$TAG" in
*"
"*)
echo "Error: TAG contains a newline; multiple plugins found."
exit 1
;;
esac
# target_commitish empty indicates the repo default branch
curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/Smaug123/WoofWare.Myriad/releases -d '{"tag_name":"'"$TAG"'","target_commitish":"","name":"'"$TAG"'","draft":false,"prerelease":false,"generate_release_notes":false}'