-
-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (35 loc) · 1.24 KB
/
ContinuousIntegration.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
name: continuous integration
on:
push:
branches:
- master
paths:
- '.github/workflows/ContinuousIntegration.yml'
- 'source/DefaultUnDo/**'
jobs:
continuous_integration:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
source-url: https://nuget.pkg.github.com/Doraku/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: dotnet build source -c Release -p:TreatWarningsAsErrors=true
- name: Run tests net462
run: dotnet test source -c Release -f net462 --no-build
- name: Run tests net48
run: dotnet test source -c Release -f net48 --no-build
- name: Run tests net8.0
run: dotnet test source -c Release -f net8.0 --no-build
- name: Decrypte snk file
env:
SNK_KEY: ${{ secrets.SNK_KEY }}
run: gpg --quiet --batch --yes --decrypt --passphrase="$env:SNK_KEY" --output ds.snk ds.snk.gpg
- name: Create package
run: dotnet pack source -c Release -o build /p:Version=0-ci$(date +'%Y%m%d%H%M%S') /p:SignAssembly=true
- name: Publish packages
run: dotnet nuget push build\*.nupkg