From f0436cb76e707d9604f71184e0feaa07d186b5fe Mon Sep 17 00:00:00 2001 From: Simon Schulze Date: Mon, 15 Aug 2022 20:53:57 +0200 Subject: [PATCH] configure actions --- .github/workflows/dotnet_develop.yml | 29 ++++++++++++++++++++++++++ .github/workflows/dotnet_main_pr.yml | 27 ++++++++++++++++++++++++ .github/workflows/dotnet_main_push.yml | 29 ++++++++++++++++++++++++++ iRLeagueApiCore.Common.sln | 7 +++++++ 4 files changed, 92 insertions(+) create mode 100644 .github/workflows/dotnet_develop.yml create mode 100644 .github/workflows/dotnet_main_pr.yml create mode 100644 .github/workflows/dotnet_main_push.yml diff --git a/.github/workflows/dotnet_develop.yml b/.github/workflows/dotnet_develop.yml new file mode 100644 index 0000000..da256b9 --- /dev/null +++ b/.github/workflows/dotnet_develop.yml @@ -0,0 +1,29 @@ +name: .NET + +on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] + +jobs: + build: + env: + BUILD_CONFIG: Debug + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + source-url: https://nuget.pkg.github.com/SSchulze1989/index.json + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build -c $BUILD_CONFIG --no-restore + - name: Test + run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal diff --git a/.github/workflows/dotnet_main_pr.yml b/.github/workflows/dotnet_main_pr.yml new file mode 100644 index 0000000..7948507 --- /dev/null +++ b/.github/workflows/dotnet_main_pr.yml @@ -0,0 +1,27 @@ +name: .NET + +on: + pull_request: + branches: [ main ] + +jobs: + build: + env: + BUILD_CONFIG: Release + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + source-url: https://nuget.pkg.github.com/SSchulze1989/index.json + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build -c $BUILD_CONFIG --no-restore + - name: Test + run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal diff --git a/.github/workflows/dotnet_main_push.yml b/.github/workflows/dotnet_main_push.yml new file mode 100644 index 0000000..2a7f94c --- /dev/null +++ b/.github/workflows/dotnet_main_push.yml @@ -0,0 +1,29 @@ +name: .NET + +on: + push: + branches: [ main ] + +jobs: + publish: + env: + BUILD_CONFIG: Release + NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + source-url: https://nuget.pkg.github.com/SSchulze1989/index.json + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build -c $BUILD_CONFIG --no-restore + - name: Test + run: dotnet test -c $BUILD_CONFIG --no-build --verbosity normal + - name: Publish + run: dotnet nuget push **\*.nupkg --skip-duplicate diff --git a/iRLeagueApiCore.Common.sln b/iRLeagueApiCore.Common.sln index 9cd7fb0..c499667 100644 --- a/iRLeagueApiCore.Common.sln +++ b/iRLeagueApiCore.Common.sln @@ -5,6 +5,13 @@ VisualStudioVersion = 17.0.31912.275 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "iRLeagueApiCore.Common", "iRLeagueApiCore.Common\iRLeagueApiCore.Common.csproj", "{50D4C91B-F279-4227-B738-7609CC1EF612}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9CCEFC0E-C777-4DBB-8EA1-B5B074357011}" + ProjectSection(SolutionItems) = preProject + .github\workflows\dotnet_develop.yml = .github\workflows\dotnet_develop.yml + .github\workflows\dotnet_main_pr.yml = .github\workflows\dotnet_main_pr.yml + .github\workflows\dotnet_main_push.yml = .github\workflows\dotnet_main_push.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU