From e5c03de7b354aba7fa7bec86aef0895b9950da58 Mon Sep 17 00:00:00 2001 From: Valters Melnalksnis Date: Mon, 29 Aug 2022 22:27:03 +0300 Subject: [PATCH] feat(build): Use global.json and nuget.config --- .github/workflows/nuget-vulnerabilities.yml | 4 +--- .github/workflows/release.yml | 6 +----- .github/workflows/test.yml | 10 ++-------- NordigenDotNet.sln | 2 ++ global.json | 7 +++++++ nuget.config | 14 ++++++++++++++ 6 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 global.json create mode 100644 nuget.config diff --git a/.github/workflows/nuget-vulnerabilities.yml b/.github/workflows/nuget-vulnerabilities.yml index b56e287..cd52953 100644 --- a/.github/workflows/nuget-vulnerabilities.yml +++ b/.github/workflows/nuget-vulnerabilities.yml @@ -27,9 +27,7 @@ jobs: steps: - uses: actions/checkout@v3.0.2 - uses: actions/setup-dotnet@v2.1.0 - - - name: Restore dependencies - run: dotnet restore + - run: dotnet restore - name: Check vulnerable packages id: packages diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be4aa12..1ef3979 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,11 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.0.2 - - - name: Setup .NET - uses: actions/setup-dotnet@v2.1.0 - with: - dotnet-version: 6.0.x + - uses: actions/setup-dotnet@v2.1.0 - name: Publish project id: publish diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0293857..72229af 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,14 +25,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.0.2 - - - name: Setup .NET - uses: actions/setup-dotnet@v2.1.0 - with: - dotnet-version: 6.0.x - - - name: Restore dependencies - run: dotnet restore + - uses: actions/setup-dotnet@v2.1.0 + - run: dotnet restore - name: Build run: > diff --git a/NordigenDotNet.sln b/NordigenDotNet.sln index ca86611..e4860d7 100644 --- a/NordigenDotNet.sln +++ b/NordigenDotNet.sln @@ -10,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig version = version CONTRIBUTING.md = CONTRIBUTING.md + global.json = global.json + nuget.config = nuget.config EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VMelnalksnis.NordigenDotNet", "source\VMelnalksnis.NordigenDotNet\VMelnalksnis.NordigenDotNet.csproj", "{C70F5B40-0A36-45CB-921B-09EA1F9A63AD}" diff --git a/global.json b/global.json new file mode 100644 index 0000000..1703d4a --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0.400", + "rollForward": "latestFeature", + "allowPrerelease": false + } +} diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..a58e5b7 --- /dev/null +++ b/nuget.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + +