Skip to content

Commit

Permalink
Created new CI and Release workflows. (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiseni authored Jul 24, 2023
1 parent 7d82123 commit aeb9467
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 167 deletions.
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"
]
}
}

0 comments on commit aeb9467

Please sign in to comment.