95 lines (80 loc) · 2.4 KB
/
release.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
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Release
on:
push:
branches: [ release-v1 ]
jobs:
build:
runs-on: ubuntu-latest
env:
HELPZ_POSTGRESQL_PASS: Password12!
EVENTFLOW_MSSQL_SERVER: 127.0.0.1,1433
EVENTFLOW_MSSQL_USER: sa
EVENTFLOW_MSSQL_PASS: Password12!
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
services:
rabbitmq:
image: rabbitmq:3-management-alpine
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
- 15672:15672
eventstore:
image: eventstore/eventstore:release-4.1.3
ports:
- "1113:1113"
- "2113:2113"
postgres:
image: postgres:10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Password12!
ports:
- "5432:5432"
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password12!
ports:
- "1433:1433"
steps:
- name: Configure sysctl limits for Elasticsearch
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 6.8.3
- uses: actions/checkout@v2
- name: Setup .NET Core 3.1.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- name: Setup .NET Core 6.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
# Yes, EventFlow has a custom built build tool. If you are reading this
# you might have a better idea of how to do it alternatively, if so,
# create a PR for EventFlow.
# https://github.com/rasmus/Bake
- name: Install Bake
run: dotnet tool install -g --version 0.12.24-beta Bake
- name: Run Bake
run: |
declare -i REVISION
REVISION=5000+$GITHUB_RUN_NUMBER
bake run --convention=Release --build-version 1.0.$REVISION --destination="nuget>github,nuget,release>github"
- name: Upload test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results
path: "**/*.trx"
if-no-files-found: error