Skip to content

Commit

Permalink
configure actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SSchulze1989 committed Aug 15, 2022
1 parent b0f2eab commit f0436cb
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/dotnet_develop.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions .github/workflows/dotnet_main_pr.yml
Original file line number Diff line number Diff line change
@@ -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
29 changes: 29 additions & 0 deletions .github/workflows/dotnet_main_push.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions iRLeagueApiCore.Common.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f0436cb

Please sign in to comment.