瀏覽代碼

Use global env definitions for GitHub Actions (#1866)

* try to fix NSJ reference
Marko Lahma 1 年之前
父節點
當前提交
215da7f31e

+ 4 - 4
.github/workflows/build.yml

@@ -8,14 +8,14 @@ on:
     - 'doc/**'
     - '**.md'
 
+env:
+  DOTNET_NOLOGO: true
+  DOTNET_CLI_TELEMETRY_OPTOUT: 1
+
 jobs:
   build:
 
     runs-on: ubuntu-latest
-    env:
-        DOTNET_NOLOGO: true
-        DOTNET_CLI_TELEMETRY_OPTOUT: 1
-
     steps:
     - name: Checkout source code
       uses: actions/checkout@v4

+ 4 - 9
.github/workflows/pr.yml

@@ -5,13 +5,14 @@ on:
   pull_request:
     branches: [ main, release/2.x, 3.x ]
 
+env:
+  DOTNET_NOLOGO: true
+  DOTNET_CLI_TELEMETRY_OPTOUT: 1
+
 jobs:
 
   windows:
     runs-on: windows-latest
-    env:
-        DOTNET_NOLOGO: true
-        DOTNET_CLI_TELEMETRY_OPTOUT: 1
 
     steps:
     - name: Checkout source code
@@ -22,9 +23,6 @@ jobs:
 
   linux:
     runs-on: ubuntu-latest
-    env:
-        DOTNET_NOLOGO: true
-        DOTNET_CLI_TELEMETRY_OPTOUT: 1
 
     steps:
     - name: Checkout source code
@@ -35,9 +33,6 @@ jobs:
 
   macos:
     runs-on: macos-14
-    env:
-        DOTNET_NOLOGO: true
-        DOTNET_CLI_TELEMETRY_OPTOUT: 1
 
     steps:
     - name: Checkout source code

+ 4 - 4
.github/workflows/release.yml

@@ -5,14 +5,14 @@ on:
     tags:
       - 'v*.*.*'
 
+env:
+  DOTNET_NOLOGO: true
+  DOTNET_CLI_TELEMETRY_OPTOUT: 1
+
 jobs:
   build:
 
     runs-on: ubuntu-latest
-    env:
-        DOTNET_NOLOGO: true
-        DOTNET_CLI_TELEMETRY_OPTOUT: 1
-
     steps:
     - name: Checkout source code
       uses: actions/checkout@v4

+ 1 - 0
Directory.Packages.props

@@ -16,6 +16,7 @@
     <PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.5.0" />
     <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
     <PackageVersion Include="MongoDB.Bson.signed" Version="2.19.0" />
+    <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
     <PackageVersion Include="NiL.JS" Version="2.5.1677" />
     <PackageVersion Include="NodaTime" Version="3.1.11" />
     <PackageVersion Include="NUnit" Version="4.1.0" />

+ 1 - 0
Jint.Tests.PublicInterface/Jint.Tests.PublicInterface.csproj

@@ -21,6 +21,7 @@
     <PackageReference Include="Flurl.Http.Signed" />
     <PackageReference Include="Microsoft.NET.Test.Sdk" />
     <PackageReference Include="MongoDB.Bson.signed" />
+    <PackageReference Include="Newtonsoft.Json" />
     <PackageReference Include="NodaTime" />
     <PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
     <PackageReference Include="System.Text.Json" Condition="!$([MSBuild]::IsTargetFrameworkCompatible($(TargetFramework), 'net8.0'))" />

+ 1 - 0
Jint.Tests/Jint.Tests.csproj

@@ -26,6 +26,7 @@
     <PackageReference Include="Microsoft.Extensions.DependencyInjection" />
     <PackageReference Include="Microsoft.NET.Test.Sdk" />
     <PackageReference Include="MongoDB.Bson.signed" />
+    <PackageReference Include="Newtonsoft.Json" />
     <PackageReference Include="System.Text.Json" />
     <PackageReference Include="xunit" />
     <PackageReference Include="xunit.runner.visualstudio" />

+ 23 - 0
Jint.sln

@@ -27,6 +27,24 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jint.AotExample", "Jint.AotExample\Jint.AotExample.csproj", "{E07CC7D2-2ADF-4D71-A5B1-88209FFC29CD}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{D60F0DFE-8860-4E25-8973-E1F11AE2466A}"
+	ProjectSection(SolutionItems) = preProject
+		.github\dependabot.yml = .github\dependabot.yml
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{85015C4E-5BBE-475D-9A17-A63434F9AA2A}"
+	ProjectSection(SolutionItems) = preProject
+		.github\workflows\build.yml = .github\workflows\build.yml
+		.github\workflows\pr.yml = .github\workflows\pr.yml
+		.github\workflows\release.yml = .github\workflows\release.yml
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEMPLATE", "{EEFDE656-C1C0-432A-941E-4EDD84452410}"
+	ProjectSection(SolutionItems) = preProject
+		.github\ISSUE_TEMPLATE\bug_report.md = .github\ISSUE_TEMPLATE\bug_report.md
+		.github\ISSUE_TEMPLATE\feature_request.md = .github\ISSUE_TEMPLATE\feature_request.md
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -69,4 +87,9 @@ Global
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 	EndGlobalSection
+	GlobalSection(NestedProjects) = preSolution
+		{D60F0DFE-8860-4E25-8973-E1F11AE2466A} = {4EB9DD72-0566-4EE4-9550-B064ED2C8332}
+		{85015C4E-5BBE-475D-9A17-A63434F9AA2A} = {D60F0DFE-8860-4E25-8973-E1F11AE2466A}
+		{EEFDE656-C1C0-432A-941E-4EDD84452410} = {D60F0DFE-8860-4E25-8973-E1F11AE2466A}
+	EndGlobalSection
 EndGlobal