Repository navigation
70 lines (60 loc) · 2.53 KB
/
Copy pathgithub-actions-release.yaml
File metadata and controls
70 lines (60 loc) · 2.53 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release
on:
workflow_dispatch:
inputs:
VersionPrefix:
type: string
description: The version of the library
required: true
default: 4.0.0
VersionSuffix:
type: string
description: The version suffix of the library (for example rc.1)
run-name: ${{ inputs.VersionSuffix && format('{0}-{1}', inputs.VersionPrefix, inputs.VersionSuffix) || inputs.VersionPrefix }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v7
- name: Setup .NET 8.x
uses: actions/setup-dotnet@v6
with:
dotnet-version: '11.x'
- name: Build Testing.Databases.SqlServer
run: dotnet pack
--property:Configuration=Release
--property:VersionPrefix=${{ github.event.inputs.VersionPrefix }}
--property:VersionSuffix=${{ github.event.inputs.VersionSuffix }}
"src/Testing.Databases.SqlServer/Testing.Databases.SqlServer.csproj"
- name: Build Testing.Databases.SqlServer.Dac
run: dotnet pack
--property:Configuration=Release
--property:VersionPrefix=${{ github.event.inputs.VersionPrefix }}
--property:VersionSuffix=${{ github.event.inputs.VersionSuffix }}
"src/Testing.Databases.SqlServer.Dac/Testing.Databases.SqlServer.Dac.csproj"
- name: Build Testing.Databases.SqlServer.EntityFramework
run: dotnet pack
--property:Configuration=Release
--property:VersionPrefix=${{ github.event.inputs.VersionPrefix }}
--property:VersionSuffix=${{ github.event.inputs.VersionSuffix }}
"src/Testing.Databases.SqlServer.EntityFramework/Testing.Databases.SqlServer.EntityFramework.csproj"
- name: Build Testing.Databases.SqlServer.SqlCmd
run: dotnet pack
--property:Configuration=Release
--property:VersionPrefix=${{ github.event.inputs.VersionPrefix }}
--property:VersionSuffix=${{ github.event.inputs.VersionSuffix }}
"src/Testing.Databases.SqlServer.SqlCmd/Testing.Databases.SqlServer.SqlCmd.csproj"
- name: NuGet login
uses: NuGet/login@v1
id: nuget_login
with:
user: ${{ secrets.NUGET_USER }}
- name: Publish the package to nuget.org
run: |
dotnet nuget push "src/**/bin/Release/*.nupkg" \
--api-key "${{steps.nuget_login.outputs.NUGET_API_KEY}}" \
--source https://api.nuget.org/v3/index.json \
--skip-duplicate