Skip to content

Commit

Permalink
Improve workflow files #6
Browse files Browse the repository at this point in the history
  • Loading branch information
DDAndyChen committed Dec 8, 2023
1 parent a0e52d5 commit a76531e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/publish Optional package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
tags:
- 'Optional-*'


env:
Project: src/Optional

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,8 +26,8 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build "src/Optional" --configuration Release --no-restore
run: dotnet build ${{ env.Project }} --configuration Release --no-restore
- name: Test
run: dotnet test "tests/Optional.Tests/Optional.Tests.csproj" --configuration Release --no-restore --verbosity normal
- name: Publish to GPR
run: dotnet nuget push "src/Optional/bin/Release/*.symbols.nupkg"
run: dotnet nuget push "${{ env.Project }}/bin/Release/*.snupkg"
11 changes: 8 additions & 3 deletions .github/workflows/publish Optional.FluentValidation package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- 'Optional.FluentValidation-*'

env:
Project: src/Optional.FluentValidation

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,8 +25,10 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build "src/Optional.FluentValidation" --configuration Release --no-restore
run: dotnet build ${{ env.Project }} --configuration Release --no-restore
- name: Test
run: dotnet test "tests/Optional.FluentValidation.Tests/Optional.FluentValidation.Tests.csproj" --configuration Release --no-restore --verbosity normal
run: |
dotnet test "tests/Optional.Tests/Optional.Tests.csproj" --configuration Release --no-restore --verbosity normal
dotnet test "tests/Optional.FluentValidation.Tests/Optional.FluentValidation.Tests.csproj" --configuration Release --no-restore --verbosity normal
- name: Publish to GPR
run: dotnet nuget push "src/Optional.FluentValidation/bin/Release/*.symbols.nupkg"
run: dotnet nuget push "${{ env.Project }}/bin/Release/*.snupkg"
11 changes: 8 additions & 3 deletions .github/workflows/publish Optional.NewtonsoftJson package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- 'Optional.NewtonsoftJson-*'

env:
Project: src/Optional.NewtonsoftJson

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -22,8 +25,10 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build "src/Optional.NewtonsoftJson" --configuration Release --no-restore
run: dotnet build ${{ env.Project }} --configuration Release --no-restore
- name: Test
run: dotnet test "tests/Optional.NewtonsoftJson.Tests/Optional.NewtonsoftJson.Tests.csproj" --configuration Release --no-restore --verbosity normal
run: |
dotnet test "tests/Optional.Tests/Optional.Tests.csproj" --configuration Release --no-restore --verbosity normal
dotnet test "tests/Optional.NewtonsoftJson.Tests/Optional.NewtonsoftJson.Tests.csproj" --configuration Release --no-restore --verbosity normal
- name: Publish to GPR
run: dotnet nuget push "src/Optional.NewtonsoftJson/bin/Release/*.symbols.nupkg"
run: dotnet nuget push "${{ env.Project }}/bin/Release/*.snupkg"
2 changes: 1 addition & 1 deletion src/Optional/Optional.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<Version>1.4.7</Version>
<Version>1.4.8</Version>
<Nullable>enable</Nullable>
<RootNamespace>DeskDirector.Text.Json</RootNamespace>
<PackageId>DeskDirector.$(AssemblyName)</PackageId>
Expand Down

0 comments on commit a76531e

Please sign in to comment.