Skip to content

Commit 966f8b1

Browse files
yaml update
1 parent 77e9c38 commit 966f8b1

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,33 @@ on:
88

99
jobs:
1010
build:
11-
11+
name: Build and test
1212
runs-on: ubuntu-latest
13+
env:
14+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
15+
CONFIGURATION: Release
16+
PACKAGES_DIRECTORY: ./packages
17+
NUGET_SOURCE: https://api.nuget.org/v3/index.json
1318

1419
steps:
1520
- uses: actions/checkout@v3
21+
1622
- name: Setup .NET
1723
uses: actions/setup-dotnet@v2
1824
with:
1925
dotnet-version: 6.0.x
26+
2027
- name: Restore dependencies
2128
run: dotnet restore ./src/OneBitSoftware.Utilities.OperationResult.sln
29+
2230
- name: Build
23-
run: dotnet build ./src/OneBitSoftware.Utilities.OperationResult.sln --no-restore
31+
run: dotnet build ./src/OneBitSoftware.Utilities.OperationResult.sln --no-restore --configuration "${{ env.CONFIGURATION }}"
32+
2433
- name: Test
2534
run: dotnet test ./src/OneBitSoftware.Utilities.OperationResult.sln --no-build --verbosity normal
35+
36+
- name: Pack OneBitSoftware.Utilities.OperationResult
37+
run: dotnet pack --no-build --configuration "${{ env.CONFIGURATION }}" ./src/OneBitSoftware.Utilities.OperationResult/OneBitSoftware.Utilities.OperationResult.csproj -o "${{ env.PACKAGES_DIRECTORY }}"
38+
39+
- name: Publish all packages
40+
run: dotnet nuget push "${{ env.PACKAGES_DIRECTORY }}/*.nupkg" --source "${{ env.NUGET_SOURCE }}" --api-key "${{ env.NUGET_KEY }}" --skip-duplicate

0 commit comments

Comments
 (0)