Skip to content

Commit a7bd141

Browse files
committed
publish in one step
1 parent a5da691 commit a7bd141

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

.github/workflows/publish_to_NuGet.yml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,42 @@ on:
66

77
jobs:
88
build:
9-
strategy:
10-
matrix:
11-
os: [ ubuntu-latest, macos-latest, windows-latest ]
12-
fail-fast: false
13-
runs-on: ${{ matrix.os }}
14-
name: Build on ${{ matrix.os }} using dotnet version ${{ matrix.dotnet }}
9+
runs-on: ubuntu-latest
1510
steps:
1611
- uses: actions/checkout@v2
12+
- uses: actions/setup-dotnet@v1
13+
with:
14+
dotnet-version: '6.0.x'
15+
- name: Restore
16+
run: dotnet restore
1717
- name: Build
18-
run: dotnet build --configuration Release
18+
run: dotnet build --no-restore --configuration Release
1919

2020
# Put back when you add tests
2121
# - name: Test
2222
# run: dotnet test --no-restore
2323

24-
publish-sss-f:
24+
publish:
2525
runs-on: ubuntu-latest
2626
needs: build
2727
steps:
2828
- uses: actions/checkout@v2
29-
- name: Create the package
30-
run: cd src/SqlStreamStore.FSharp; dotnet pack --configuration Release -o ../../ReleaseSSSF -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-source
31-
- name: Publish the package to NuGet
29+
- uses: actions/setup-dotnet@v1
30+
with:
31+
dotnet-version: '6.0.x'
32+
- name: Restore
33+
run: dotnet restore
34+
- name: Pack SQLStreamStore.FSharp
35+
working-directory: src/SqlStreamStore.FSharp
36+
run: dotnet pack --no-restore --configuration Release -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-symbols --include-source
37+
- name: Pack SqlStreamStore.FSharp.Postgres
38+
working-directory: src/SqlStreamStore.FSharp.Postgres
39+
run: dotnet pack --no-restore --configuration Release -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-symbols --include-source
40+
- name: Publish SQLStreamStore.FSharp to NuGet
3241
env:
3342
NUGET_AUTH_TOKEN: ${{ secrets.SQLSTREAMSTORE_NUGET_AUTH_TOKEN }}
34-
run: dotnet nuget push ReleaseSSSF/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}
35-
36-
publish-sss-f-postgres:
37-
runs-on: ubuntu-latest
38-
needs: build
39-
steps:
40-
- uses: actions/checkout@v2
41-
- name: Create the package
42-
run: cd src/SqlStreamStore.FSharp.Postgres; dotnet pack --configuration Release -o ../../ReleaseSSSFP -p:PackageVersion=${GITHUB_REF/refs\/tags\/v/''} --include-source
43-
- name: Publish the package to NuGet
43+
run: dotnet nuget push src/SqlStreamStore.FSharp/bin/Release/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}
44+
- name: Publish SqlStreamStore.FSharp.Postgres to NuGet
4445
env:
4546
NUGET_AUTH_TOKEN: ${{ secrets.SQLSTREAMSTORE_POSTGRES_NUGET_AUTH_TOKEN }}
46-
run: dotnet nuget push ReleaseSSSFP/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}
47+
run: dotnet nuget push src/SqlStreamStore.FSharp.Postgres/bin/Release/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json -k ${NUGET_AUTH_TOKEN}

0 commit comments

Comments
 (0)