-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.92 KB
/
release-packages-to-nuget.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release packages
on:
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Determine current version
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
# Restore NuGet packages
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
with:
nuget-version: '5.x'
- name: Restore NuGet Packages
run: nuget restore efcore-sqlexpressions.sln
# Build solution
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Build
run: |
msbuild efcore-sqlexpressions.sln
- run: dotnet pack -o nuget /p:ContinuousIntegrationBuild=true -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} -c Release ./src/AxaFrance.EFCore.SqlExpressions/AxaFrance.EFCore.SqlExpressions.csproj
- run: dotnet pack -o nuget /p:ContinuousIntegrationBuild=true -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }} -c Release ./src/AxaFrance.EFCore.SqlExpressions.InMemory/AxaFrance.EFCore.SqlExpressions.InMemory.csproj
- uses: actions/upload-artifact@v3
with:
name: packages
path: |
nuget/*.nupkg
nuget/*.snupkg
- name: Publish Nuget to GitHub registry
run: |
dotnet nuget push 'nuget/AxaFrance.EFCore.SqlExpressions.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg' -k ${{ secrets.NUGET_TOKEN }} -s 'https://api.nuget.org/v3/index.json' --skip-duplicate
dotnet nuget push 'nuget/AxaFrance.EFCore.SqlExpressions.InMemory.${{ steps.gitversion.outputs.nuGetVersionV2 }}.nupkg' -k ${{ secrets.NUGET_TOKEN }} -s 'https://api.nuget.org/v3/index.json' --skip-duplicate