Skip to content

Commit

Permalink
build: fix csproj path in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
R-unic committed Jul 21, 2024
1 parent a5ba55f commit 334cf6a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
cp -r types/RobloxTypes/* deploy/Include
cp types/RobloxTypes/Generated/PluginSecurity.cs deploy/PluginSecurity.cs
cp types/RobloxTypes/README.md deploy/README.md
cp types/RobloxTypes/RobloxTypes.csproj deploy/RobloxTypes.csproj
cd deploy
Expand All @@ -75,7 +74,7 @@ jobs:
# set -x # Debug mode
# Extract current version from .csproj
CURRENT_VERSION=$(xmlstarlet sel -t -v "//Project/PropertyGroup/Version" ./RobloxTypes.csproj)
CURRENT_VERSION=$(xmlstarlet sel -t -v "//Project/PropertyGroup/Version" ./Include/RobloxTypes.csproj)
echo "Current version: $CURRENT_VERSION"
# Increment patch version
Expand All @@ -85,10 +84,10 @@ jobs:
echo "New version: $NEW_VERSION"
# Update version in .csproj
xmlstarlet ed -L -u "//Project/PropertyGroup/Version" -v "$NEW_VERSION" ./RobloxTypes.csproj
xmlstarlet ed -L -u "//Project/PropertyGroup/Version" -v "$NEW_VERSION" ./Include/RobloxTypes.csproj
# Commit version change
git add ./RobloxTypes.csproj
git add ./Include/RobloxTypes.csproj
git commit -m "build: bump version to $NEW_VERSION"
git push https://R-unic:${{ secrets.github_token }}@github.com/roblox-csharp/types.git HEAD:deploy
Expand All @@ -102,7 +101,7 @@ jobs:
echo "VERSION_EXISTS=$VERSION_EXISTS"
# Find and publish the latest package
PACKAGE_PATH=./RobloxTypes/bin/Release/Roblox.$NEW_VERSION.nupkg
PACKAGE_PATH=./Include/bin/Release/Roblox.$NEW_VERSION.nupkg
echo "Publishing package: $PACKAGE_PATH"
dotnet nuget push "$PACKAGE_PATH" --api-key ${{ secrets.github_token }} --source "github" --skip-duplicate
fi
Expand Down

0 comments on commit 334cf6a

Please sign in to comment.