Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterOrneholm committed Apr 10, 2024
1 parent d509fb1 commit c2d60e8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:

env:
dotnetVerbosity: 'Detailed'
libraryProjectPath: './src/Orneholm.PEAccountingNet/Orneholm.PEAccountingNet.csproj'
testProjectPath: './test/Orneholm.PEAccountingNet.Test/Orneholm.PEAccountingNet.Test.csproj'
samplesProjectPath: './samples/Orneholm.PEAccountingNet.ConsoleSample/Orneholm.PEAccountingNet.ConsoleSample.csproj'

jobs:
build-and-test:
Expand All @@ -40,19 +43,18 @@ jobs:
run: dotnet restore --verbosity ${{ env.dotnetVerbosity }}

- name: Build
run: dotnet build ./src/**/*.csproj --configuration Release --verbosity ${{ env.dotnetVerbosity }}
shell: bash
run: dotnet build ${{ env.libraryProjectPath }} --configuration Release --verbosity ${{ env.dotnetVerbosity }}

- name: Test
run: dotnet test ./src/**/*.csproj --configuration Release --verbosity ${{ env.dotnetVerbosity }} --collect "Code coverage"
run: dotnet test ${{ env.testProjectPath }} --configuration Release --verbosity ${{ env.dotnetVerbosity }} --collect "Code coverage"
shell: bash

- name: Pack CI
run: dotnet pack ./src/**/*.csproj --output ./artifacts/ci --configuration Release --verbosity ${{ env.dotnetVerbosity }} /p:VersionSuffix=ci-${{ github.run_number }}
run: dotnet pack ${{ env.libraryProjectPath }} --output ./artifacts/ci --configuration Release --verbosity ${{ env.dotnetVerbosity }} /p:VersionSuffix=ci-${{ github.run_number }}
shell: bash

- name: Pack Release
run: dotnet pack ./src/**/*.csproj --output ./artifacts/release --configuration Release --verbosity ${{ env.dotnetVerbosity }}
run: dotnet pack ${{ env.libraryProjectPath }} --output ./artifacts/release --configuration Release --verbosity ${{ env.dotnetVerbosity }}
shell: bash

- uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -81,7 +83,7 @@ jobs:
uses: actions/setup-dotnet@v4

- name: Publish Samples
run: dotnet publish ./samples/**/*.csproj --configuration Release --output ./samples/
run: dotnet publish ${{ env.samplesProjectPath }} --configuration Release --output ./samples/
shell: bash

- uses: actions/upload-artifact@v2
Expand Down

0 comments on commit c2d60e8

Please sign in to comment.