-
Notifications
You must be signed in to change notification settings - Fork 84
74 lines (62 loc) · 1.66 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: CI
on:
push:
branches: [ main, develop, build-workflow, update-redis-client ]
pull_request:
branches: [ main, develop, build-workflow ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Display SemVer
run: |
echo "SemVer: $GITVERSION_SEMVER"
- name: Run the Cake script
uses: cake-build/cake-action@v1
with:
script-path: build.cake
target: ci
- name: Collect Package Artifacts
uses: actions/upload-artifact@v3
with:
name: nuget-packages
path: ./dist_package/Nimbus.*.nupkg
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
trx_files: ./dist_package/**/*.trx
- name: Publish NuGet Packages
if: startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/develop')
uses: cake-build/cake-action@v1
with:
script-path: build.cake
target: pushpackages
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
services:
redis:
image: redis
ports:
- 6379:6379
seq:
image: datalust/seq:latest
ports:
- 5341:80
env:
ACCEPT_EULA: Y