Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustoDeveloper committed Jan 26, 2023
0 parents commit 291d221
Show file tree
Hide file tree
Showing 17 changed files with 1,297 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build-CI

on:
workflow_call:

jobs:
build:
name: Building application
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Build stage
run: dotnet build --configuration Release
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release-CD

on:
push:
branches: [ main ]

env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_NUGET_API_KEY: ${{ secrets.GH_TOKEN }}
NUGET_API_URL: ${{ vars.NUGET_API_URL }}
GITHUB_NUGET_API_URL: ${{ vars.GH_NUGET_API_URL }}
PROJECT_FILE_PATH: 'src/fluent-execution/Dapper.FluentExecution.csproj'

jobs:
build:
name: Build stage
uses: ./.github/workflows/build.yml

test:
name: Test stage
needs: [ build ]
uses: ./.github/workflows/test.yml

Publish:
name: Publishing application
needs: [ build, test ]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Creating project package
run: dotnet pack $PROJECT_FILE_PATH --configuration Release -o nupkg

- name: Publishing package on Nuget V3
run: dotnet nuget push ./nupkg/*.nupkg --source $NUGET_API_URL --skip-duplicate --api-key $NUGET_API_KEY


- name: Publishing package on Github Nuget
run: dotnet nuget push ./nupkg/*.nupkg --source $GITHUB_NUGET_API_URL --skip-duplicate --api-key $GITHUB_NUGET_API_KEY
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test-CI

on:
workflow_call:

jobs:
build:
name: Testing application
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Build stage
run: dotnet build --configuration Release

- name: Test stage
run: dotnet test --no-build --verbosity normal --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover

- name: Test code coverage
uses: codecov/codecov-action@v1
Loading

0 comments on commit 291d221

Please sign in to comment.