-
Notifications
You must be signed in to change notification settings - Fork 47
63 lines (52 loc) · 1.58 KB
/
ci.yaml
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
name: CI/CD
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
release:
types:
- created
jobs:
build:
name: Build, Test, and Deploy
runs-on: windows-latest
steps:
- name: 🛒 Checkout
uses: actions/checkout@v2
- name: ✨ Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: "5.0.x"
- name: ✨ Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
include-prerelease: true
- name: 🚚 Restore
run: dotnet restore src
- name: 🛠️ Build
run: dotnet build src --configuration Release --no-restore
- name: 🧪 Test
run: dotnet test src --configuration Release --no-build
- name: 📦 Pack
run: dotnet pack src --configuration Release --no-build
- name: 💾 Store Release Package
if: github.event_name == 'release'
uses: actions/upload-artifact@v2
with:
name: Packages
retention-days: 1
path: |
src/FftSharp/bin/Release/*.nupkg
src/FftSharp/bin/Release/*.snupkg
- name: 🔑 Configure NuGet Secrets
if: github.event_name == 'release'
uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
- name: 🚀 Deploy Release Package
if: github.event_name == 'release'
run: nuget push "src\FftSharp\bin\Release\*.nupkg" -SkipDuplicate -Source https://api.nuget.org/v3/index.json