59 lines (50 loc) · 1.48 KB
/
NUnit3TestAdapter.Myget.Publish.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
56
57
58
59
name: NUnit3TestAdapter.Myget.Publish
on:
push:
branches:
- main
- master
- release
- 'v3'
- myget
workflow_dispatch:
defaults:
run:
shell: pwsh
jobs:
build-windows:
name: Windows Build
runs-on: windows-latest
steps:
- name: ⤵️ Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🛠️ Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: 🛠️ Install dotnet tools
run: dotnet tool restore
- name: 🔨 Build
run: dotnet tool run dotnet-cake --configuration=Release
- name: 📦 Package
run: dotnet tool run dotnet-cake --target=Package
- name: 💾 Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Package
path: package
- name: Publish nupkg and snupkg to Myget.org
run: |
foreach($file in (Get-ChildItem package -Recurse -Include *.nupkg)) {
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate
}
foreach($file in (Get-ChildItem "package" -Recurse -Include *.snupkg)) {
dotnet nuget push $file --api-key "${{ secrets.PUBLISHMYGET }}" --source https://www.myget.org/F/nunit/api/v3/index.json --skip-duplicate
}