Skip to content

Commit

Permalink
add CD pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Boussaer authored and Arnaud Boussaer committed Feb 13, 2025
1 parent 5c69c08 commit f8af327
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 33 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/odata2linq-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: odata2linq-cd

on:
push:
tags:
- 'OData2Linq_*.*.*'

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['6.0.x']

steps:
- uses: actions/checkout@v4
- name: Setup dotnet ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore ./AspNetCoreOData.sln
- name: Build
run: dotnet build ./AspNetCoreOData.sln -c Release --no-restore
- name: Test
run: dotnet test ./AspNetCoreOData.sln -c Release --no-build --verbosity normal
- name: Pack
run: dotnet pack ./src/OData2Linq.csproj -c Release -o .\artifacts --no-build
- name: Publish to NuGet
run: dotnet nuget push .\artifacts\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/odata2linq-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET
name: odata2linq-ci

on:
push:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/odata2linq-ci2.yml

This file was deleted.

3 changes: 2 additions & 1 deletion src/OData2Linq/OData2Linq.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>FriendAssemblies.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.0.0</Version>
<Version>0.0.7</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/ArnaudB88/OData2Linq</RepositoryUrl>
Expand All @@ -32,6 +32,7 @@
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\.github\workflows\odata2linq-cd.yml" Link="odata2linq-cd.yml" />
<None Include="..\..\.github\workflows\odata2linq-ci.yml" Link="odata2linq-ci.yml" />
</ItemGroup>
</Project>

0 comments on commit f8af327

Please sign in to comment.