-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdotnet-samples-build-continuous.yml
More file actions
47 lines (34 loc) · 1.23 KB
/
dotnet-samples-build-continuous.yml
File metadata and controls
47 lines (34 loc) · 1.23 KB
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
name: Build-Samples
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
# extract branch name
- name: Extract branch name
if: github.event_name != 'pull_request'
shell: bash
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
id: extract_branch
# extract branch name on pull request
- name: Extract branch name on pull request
if: github.event_name == 'pull_request'
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV
# print branch name
- name: Get branch name
run: echo "The branch name is ${{ env.BRANCH_NAME }}"
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5
- name: Restore NuGet Packages
run: nuget restore ".Net Framework/samples/JsonToJsonMapper.samples/JsonToJsonMapper.samples.sln"
- name: Build
run: msbuild ".Net Framework/samples/JsonToJsonMapper.samples/JsonToJsonMapper.samples.sln" /p:Configuration=Release