-
Notifications
You must be signed in to change notification settings - Fork 75
32 lines (24 loc) · 1.15 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
- name: Test
run: dotnet test
- name: Pack NuGet packages (CI versions)
if: startsWith(github.ref, 'refs/heads/') && github.event_name == 'push' && startsWith(github.repository, 'efcore/')
run: dotnet pack --configuration Release --property:PackageOutputPath="$PWD/nupkgs" --version-suffix "ci.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}" -p:ContinuousIntegrationBuild=true
- name: Pack NuGet packages (Release versions)
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' && startsWith(github.repository, 'efcore/')
run: dotnet pack --configuration Release --property:PackageOutputPath="$PWD/nupkgs" -p:ContinuousIntegrationBuild=true
- name: Upload artifacts
if: github.event_name == 'push' && startsWith(github.repository, 'efcore/')
uses: actions/upload-artifact@v4
with:
name: EFCore.NamingConventions
path: nupkgs