-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (33 loc) · 1.51 KB
/
dotnet.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
name: .NET
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
env:
DB_HOST: Server
DB_NAME: IMIS
DB_USER: IMISuser
DB_PASSWORD: IMISuser@1234
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: |
cp /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi/config/appsettings.CHF.json.dist /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi/config/appsettings.CHF.json
envsubst '${DB_HOST},${DB_USER},${DB_PASSWORD},${DB_NAME}' < /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi/config/appsettings.Development.json.dist > /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi/config/appsettings.Development.json
cp /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi.IntegrationTests/appsettings.Test.json.dist /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi.IntegrationTests/appsettings.Test.json
dotnet publish --no-restore --configuration Debug --verbosity quiet
- name: Publish artifact
uses: actions/upload-artifact@master
with:
name: restapi-debug-${{github.run_number}}-${{github.sha}}
path: /home/runner/work/rest_api_c-sharp/rest_api_c-sharp/OpenImis.RestApi/bin/Debug/netcoreapp2.1/publish