File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build-Samples
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ build :
11+
12+ runs-on : windows-latest
13+
14+ steps :
15+ # extract branch name
16+ - name : Extract branch name
17+ if : github.event_name != 'pull_request'
18+ shell : bash
19+ run : echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
20+ id : extract_branch
21+
22+ # extract branch name on pull request
23+ - name : Extract branch name on pull request
24+ if : github.event_name == 'pull_request'
25+ run : echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV
26+
27+ # print branch name
28+ - name : Get branch name
29+ run : echo "The branch name is ${{ env.BRANCH_NAME }}"
30+
31+ - uses : actions/checkout@v2
32+
33+ - name : Setup .NET
34+ uses : actions/setup-dotnet@v1
35+
36+ - name : setup-msbuild
37+ uses : microsoft/setup-msbuild@v1
38+
39+ - name : Setup NuGet
40+ uses : NuGet/setup-nuget@v1.0.5
41+
42+ - name : Restore NuGet Packages
43+ run : nuget restore ".Net Framework/samples/JsonToJsonMapper.samples/JsonToJsonMapper.samples.sln"
44+
45+ - name : Build
46+ run : msbuild ".Net Framework/samples/JsonToJsonMapper.samples/JsonToJsonMapper.samples.sln" /p:Configuration=Release
47+
You can’t perform that action at this time.
0 commit comments