Skip to content

Commit 2ed0476

Browse files
committed
2 parents e464c1f + 6db3e15 commit 2ed0476

File tree

1 file changed

+13
-38
lines changed

1 file changed

+13
-38
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# Credits due: by https://dusted.codes/github-actions-for-dotnet-core-nuget-packages#branch-and-pull-request-trigger
2-
31
name: Build
4-
52
on:
63
push:
74
pull_request:
@@ -20,40 +17,18 @@ env:
2017
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2118

2219
jobs:
23-
build-v1:
24-
strategy:
25-
matrix:
26-
os: [ubuntu-latest, windows-latest, macos-latest]
27-
runs-on: ${{ matrix.os }}
28-
29-
steps:
30-
- uses: actions/checkout@v2
31-
- name: Setup .NET Core
32-
uses: actions/setup-dotnet@v1
33-
with:
34-
dotnet-version: 6.0.x
35-
include-prerelease: True
36-
- name: Install dependencies
37-
run: dotnet restore EntityFrameworkCore.Triggered.sln -p:Configuration=ReleaseV1
38-
- name: Build
39-
run: dotnet build --configuration ReleaseV1 --no-restore EntityFrameworkCore.Triggered.sln
40-
- name: Test
41-
run: dotnet test --configuration ReleaseV1 --verbosity normal EntityFrameworkCore.Triggered.sln
42-
- name: Pack
43-
if: matrix.os == 'ubuntu-latest'
44-
run: |
45-
dotnet pack -v normal -c ReleaseV1 --include-symbols --include-source -p:PackageVersion=$GITHUB_RUN_ID -o nupkg EntityFrameworkCore.Triggered.Core-v1.slnf
46-
- name: Upload Artifact
47-
if: matrix.os == 'ubuntu-latest'
48-
uses: actions/upload-artifact@v2
49-
with:
50-
name: nupkg
51-
path: ./nupkg/*.nupkg
52-
5320
build:
5421
strategy:
5522
matrix:
5623
os: [ubuntu-latest, windows-latest, macos-latest]
24+
version: [1, 2, 3]
25+
include:
26+
- version: 1
27+
configuration: ReleaseV1
28+
- version: 2
29+
configuration: ReleaseV2
30+
- version: 3
31+
configuration: Release
5732
runs-on: ${{ matrix.os }}
5833

5934
steps:
@@ -64,22 +39,22 @@ jobs:
6439
dotnet-version: 6.0.x
6540
include-prerelease: True
6641
- name: Install dependencies
67-
run: dotnet restore EntityFrameworkCore.Triggered.sln -p:Configuration=Release
42+
run: dotnet restore EntityFrameworkCore.Triggered.sln -p:Configuration=${{ matrix.configuration }}
6843
- name: Build
69-
run: dotnet build --configuration Release --no-restore EntityFrameworkCore.Triggered.sln
44+
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore EntityFrameworkCore.Triggered.sln
7045
- name: Test
71-
run: dotnet test --configuration Release --verbosity normal EntityFrameworkCore.Triggered.sln
46+
run: dotnet test --configuration ${{ matrix.configuration }} --verbosity normal EntityFrameworkCore.Triggered.sln
7247
- name: Pack
7348
if: matrix.os == 'ubuntu-latest'
7449
run: |
75-
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=2.0.0-pre-$GITHUB_RUN_ID -o nupkg EntityFrameworkCore.Triggered.Core.slnf
50+
dotnet pack -v normal --configuration ${{ matrix.configuration }} --include-symbols --include-source -p:PackageVersion=${{ matrix.version }}-pre-$GITHUB_RUN_ID -o nupkg EntityFrameworkCore.Triggered.Core.slnf
7651
- name: Upload Artifact
7752
if: matrix.os == 'ubuntu-latest'
7853
uses: actions/upload-artifact@v2
7954
with:
8055
name: nupkg
8156
path: ./nupkg/*.nupkg
82-
57+
8358
build-samples:
8459
strategy:
8560
matrix:

0 commit comments

Comments
 (0)