-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (53 loc) · 2.06 KB
/
dotnet.yml
File metadata and controls
75 lines (53 loc) · 2.06 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
71
72
73
74
75
name: Setup CodeAnalysis .NET
on:
push:
branches: [ main, dev, feature/*, fix/*, release/* ]
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.0.x
# dotnet-quality: 'preview' # When using preview versions
dotnet-quality: 'ga' # General Availability
# Create Local NuGet Source
- name: Create Local NuGet Directory
run: mkdir ~/nuget
- name: Add Local Nuget Source
run: dotnet nuget add source ~/nuget
# CodeAnalysis.Extensions
- name: Restore CodeAnalysis.Extensions
run: dotnet restore ./src/*/CodeAnalysis.Extensions.csproj
- name: Build CodeAnalysis.Extensions
run: dotnet build ./src/*/CodeAnalysis.Extensions.csproj --no-restore -c Release
- name: Pack CodeAnalysis.Extensions
run: dotnet pack ./src/*/CodeAnalysis.Extensions.csproj --no-restore -o ~/nuget -c Release
# CodeAnalysis.SourceBuilder
- name: Restore CodeAnalysis.SourceBuilder
run: dotnet restore ./src/*/CodeAnalysis.SourceBuilder.csproj
- name: Build CodeAnalysis.SourceBuilder
run: dotnet build ./src/*/CodeAnalysis.SourceBuilder.csproj --no-restore -c Release
- name: Pack CodeAnalysis.SourceBuilder
run: dotnet pack ./src/*/CodeAnalysis.SourceBuilder.csproj --no-restore -o ~/nuget -c Release
# CodeAnalysis
- name: Restore CodeAnalysis
run: dotnet restore ./src/*/CodeAnalysis.csproj
- name: Build CodeAnalysis
run: dotnet build ./src/*/CodeAnalysis.csproj --no-restore -c Release
- name: Pack CodeAnalysis
run: dotnet pack ./src/*/CodeAnalysis.csproj --no-restore -o ~/nuget -c Release
# Push
- name: Push Packages
if: ${{ github.event_name == 'release' }}
run: >
dotnet nuget push "../../../nuget/*.nupkg"
-s https://api.nuget.org/v3/index.json
-k ${{ secrets.NuGetSourcePassword }}
--skip-duplicate