Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new CI and Release workflows. #350

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/build-test-ef6.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/build-test.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Test

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'Specification/**'
- 'Specification.EntityFrameworkCore/**'
- 'Specification.EntityFramework6/**'
pull_request:
branches:
- main
paths:
- 'Specification/**'
- 'Specification.EntityFrameworkCore/**'
- 'Specification.EntityFramework6/**'

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build
run: dotnet build ci.slnf --configuration Release
- name: Test
run: dotnet test ci.slnf --configuration Release --no-build --no-restore
31 changes: 0 additions & 31 deletions .github/workflows/publish.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/publishef6.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/publishefcore.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release to Nuget

on:
release:
types: [published]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build
run: dotnet build ci.slnf --configuration Release
- name: Test
run: dotnet test ci.slnf --configuration Release --no-build --no-restore
- name: Pack
run: dotnet pack ci.slnf --configuration Release --no-build --no-restore --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
13 changes: 13 additions & 0 deletions ci.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"solution": {
"path": "Ardalis.Specification.sln",
"projects": [
"Specification.EntityFramework6\\src\\Ardalis.Specification.EntityFramework6\\Ardalis.Specification.EntityFramework6.csproj",
"Specification.EntityFramework6\\tests\\Ardalis.Specification.EntityFramework6.IntegrationTests\\Ardalis.Specification.EntityFramework6.IntegrationTests.csproj",
"Specification.EntityFrameworkCore\\src\\Ardalis.Specification.EntityFrameworkCore\\Ardalis.Specification.EntityFrameworkCore.csproj",
"Specification.EntityFrameworkCore\\tests\\Ardalis.Specification.EntityFrameworkCore.IntegrationTests\\Ardalis.Specification.EntityFrameworkCore.IntegrationTests.csproj",
"Specification\\src\\Ardalis.Specification\\Ardalis.Specification.csproj",
"Specification\\tests\\Ardalis.Specification.UnitTests\\Ardalis.Specification.UnitTests.csproj"
]
}
}