Skip to content

Fix security issues #85

Fix security issues

Fix security issues #85

name: Build
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/Json2JsonMapper.sln"
- name: Build
run: msbuild ".Net Framework/Json2JsonMapper.sln" /p:Configuration=Release