forked from weknow-network/Event-Source-Backbone
-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (62 loc) · 2.26 KB
/
build-publish-v2.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
75
76
77
78
79
80
81
82
name: Deploy
on:
workflow_run:
workflows: ["Prepare"]
types:
- completed
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
default: 'warning'
env: # https://docs.github.com/en/actions/learn-github-actions/environment-variables
BUILD_CONFIG: Release
DOTNET_VER: 7.0.x
INCLUDE_PRERELEASE: false
jobs:
build:
name: build
runs-on: ubuntu-latest
services:
mssql:
image: redislabs/rejson:latest
# env:
# PASSWORD: ${{ secrets.NUGET_PUBLISH }}
ports:
- 6379:6379
env:
REDIS_EVENT_SOURCE_ENDPOINT: localhost:6379
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VER }}
include-prerelease: ${{ env.INCLUDE_PRERELEASE }}
- name: Restore dependencies
run: dotnet restore /property:Configuration=${{ env.BUILD_CONFIG }}
- name: Build
run: dotnet build --configuration ${{ env.BUILD_CONFIG }} --no-restore
- name: Unit Test
run: dotnet test Tests/EventSourcing.Backbone.UnitTests --configuration ${{ env.BUILD_CONFIG }} --no-restore --no-build --verbosity normal
- name: Integration Test
run: dotnet test Tests/EventSourcing.Backbone.IntegrationTests --configuration ${{ env.BUILD_CONFIG }} --no-restore --no-build --verbosity normal --filter provider!=s3
- name: Push generated package to GitHub registry
run: dotnet nuget push ./**/*.nupkg -k ${{ secrets.NUGET_PUBLISH }} -s https://api.nuget.org/v3/index.json --skip-duplicate
src-gen:
name: src-gen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VER }}
include-prerelease: ${{ env.INCLUDE_PRERELEASE }}
- name: Restore dependencies
run: dotnet restore /property:Configuration=Gen
- name: Build
run: dotnet build --configuration Gen --no-restore
- name: Push generated package to GitHub registry
run: dotnet nuget push ./**/*.nupkg -k ${{ secrets.NUGET_PUBLISH }} -s https://api.nuget.org/v3/index.json --skip-duplicate