From a17982ae6cefa491f6efbeb4b0ecb3126ff0bf27 Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Wed, 25 Mar 2026 14:52:34 -0700 Subject: [PATCH 1/6] Add category to expected failing tests --- tests/Lua.Tests/LuaTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Lua.Tests/LuaTests.cs b/tests/Lua.Tests/LuaTests.cs index daa9887b..5db7ef2d 100644 --- a/tests/Lua.Tests/LuaTests.cs +++ b/tests/Lua.Tests/LuaTests.cs @@ -15,9 +15,9 @@ public class LuaTests //[TestCase("tests-lua/pm.lua")] //string.match is not implemented //[TestCase("tests-lua/sort.lua")] //check for "invalid order function" is not implemented //[TestCase("tests-lua/calls.lua")] // string.dump and reader function for load chunk is not implemented - [TestCase("tests-lua/files.lua")] + [TestCase("tests-lua/files.lua", Category = "ExpectedFailure")] [TestCase("tests-lua/closure.lua")] - [TestCase("tests-lua/errors.lua")] // get table name if nil is not implemented + [TestCase("tests-lua/errors.lua", Category = "ExpectedFailure")] // get table name if nil is not implemented [TestCase("tests-lua/events.lua")] [TestCase("tests-lua/vararg.lua")] [TestCase("tests-lua/nextvar.lua")] From c9439054bb91c1af48ffe720491005f67c5d07e4 Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Wed, 25 Mar 2026 14:53:37 -0700 Subject: [PATCH 2/6] GHA --- .github/workflows/nuget.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/nuget.yml diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 00000000..ecc6de67 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,39 @@ +name: NuGet + +on: + workflow_dispatch: + push: + tags: + - "v*.*.*" + +jobs: + build-pack: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore src/Lua/Lua.csproj + + - name: Test + run: dotnet test tests/Lua.Tests/Lua.Tests.csproj -c Release --no-restore --filter "TestCategory!=ExpectedFailure" + + - name: Pack + run: dotnet pack src/Lua/Lua.csproj -c Release --no-restore -o ./artifacts/nuget + + - name: Upload package artifact + uses: actions/upload-artifact@v4 + with: + name: nuget-package + path: artifacts/nuget/*.nupkg + + - name: Publish to NuGet + if: startsWith(github.ref, 'refs/tags/v') + run: dotnet nuget push "artifacts/nuget/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate From d03b3afad615c4bb58c5f10ad051634cb534223e Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Wed, 25 Mar 2026 16:09:06 -0700 Subject: [PATCH 3/6] Fix .NET restore --- .github/workflows/nuget.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index ecc6de67..e105fa86 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -20,7 +20,7 @@ jobs: dotnet-version: 10.0.x - name: Restore - run: dotnet restore src/Lua/Lua.csproj + run: dotnet restore Lua.slnx - name: Test run: dotnet test tests/Lua.Tests/Lua.Tests.csproj -c Release --no-restore --filter "TestCategory!=ExpectedFailure" From 997ae7e3227293b454edb4dbbb679d66cfce56ce Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Wed, 25 Mar 2026 16:27:10 -0700 Subject: [PATCH 4/6] Git ignore artifacts dir --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 496ee2ca..61d9ba06 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.DS_Store \ No newline at end of file +.DS_Store +artifacts/ From 09f01c408c5d350c9454e76eb96ab47e8062cf39 Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Wed, 25 Mar 2026 17:51:56 -0700 Subject: [PATCH 5/6] Compare versions --- .github/workflows/nuget.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index e105fa86..e79b310d 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -14,6 +14,22 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Validate release versions + if: startsWith(github.ref, 'refs/tags/v') + run: | + TAG_VERSION="${GITHUB_REF_NAME#v}" + PROPS_VERSION=$(grep -oPm1 '(?<=)[^<]+' Directory.Build.props) + UNITY_VERSION=$(grep -oPm1 '(?<="version": ")[^"]+' src/Lua.Unity/Assets/Lua.Unity/package.json) + + echo "Tag version: ${TAG_VERSION}" + echo "Props version: ${PROPS_VERSION}" + echo "Unity version: ${UNITY_VERSION}" + + if [ "${TAG_VERSION}" != "${PROPS_VERSION}" ] || [ "${TAG_VERSION}" != "${UNITY_VERSION}" ]; then + echo "Version mismatch detected." + exit 1 + fi + - name: Setup .NET uses: actions/setup-dotnet@v4 with: From 3a07299e60a48f444fe445b91e61a84614456cfd Mon Sep 17 00:00:00 2001 From: Ashton Meuser Date: Fri, 3 Apr 2026 08:45:27 -0700 Subject: [PATCH 6/6] Update .github/workflows/nuget.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/nuget.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index e79b310d..57060465 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -52,4 +52,4 @@ jobs: - name: Publish to NuGet if: startsWith(github.ref, 'refs/tags/v') - run: dotnet nuget push "artifacts/nuget/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate + run: dotnet nuget push artifacts/nuget/*.nupkg --api-key "${{ secrets.NUGET_API_KEY }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate