mirror of
https://github.com/fergalmoran/EFCore.NamingConventions.git
synced 2025-12-22 09:38:21 +00:00
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
name: Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2.4.0
|
|
|
|
- name: Setup .NET Core SDK
|
|
uses: actions/setup-dotnet@v2
|
|
with:
|
|
dotnet-version: '6.0.100-rc.1.21463.6'
|
|
|
|
- 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 --output 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 --output nupkgs -p:ContinuousIntegrationBuild=true
|
|
|
|
- name: Upload artifacts
|
|
if: github.event_name == 'push' && startsWith(github.repository, 'efcore/')
|
|
uses: actions/upload-artifact@v2.3.1
|
|
with:
|
|
name: EFCore.NamingConventions
|
|
path: nupkgs
|