-
-
Notifications
You must be signed in to change notification settings - Fork 247
55 lines (42 loc) · 1.64 KB
/
dotnet.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
55
name: .NET
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Update Version
run: |
((Get-Content -Path .\src\SqlQueryStressCLI\AssemblyInfo.cs -Raw) -Replace "1.0.0.0", "0.9.8.${{ github.run_number }}") | Set-Content -Path .\src\SqlQueryStressCLI\AssemblyInfo.cs
((Get-Content -Path .\src\SQLQueryStress\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.0.0", "0.9.8.${{ github.run_number }}") | Set-Content -Path .\src\SqlQueryStressCLI\AssemblyInfo.cs
shell: pwsh
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build ./src/SQLQueryStress.sln --configuration Release
- name: dotnet publish
run: dotnet publish ./src/SQLQueryStress/SqlQueryStress.csproj --configuration Release --output .\src\SQLQueryStress\bin\Publish\net8.0-windows\ --self-contained true
- name: zip app
run: 7z a SqlQueryStress-0.9.8.${{ github.run_number }}.zip .\src\SQLQueryStress\bin\Publish\net8.0-windows\*.exe
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
*.zip
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: |
**\\*.nupkg
- name: Publish NuGet
if: startsWith(github.ref, 'refs/heads/master') && github.repository_owner == 'ErikEJ'
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET }} --skip-duplicate