Add workflow build #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
workflow_dispatch: | ||
workflow_call: | ||
branch-postfix: | ||
Check failure on line 9 in .github/workflows/build.yml GitHub Actions / BuildInvalid workflow file
|
||
required: false | ||
type: string | ||
env: | ||
BUILD: ${{ inputs.branch-postfix == 'master' && 'Release' || 'Debug' }} | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 7.0.x | ||
- name: Build | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
# Add additional options to the MSBuild command line here (like platform or verbosity level). | ||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | ||
run: dotnet build --nologo /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Version=1.0.${{ env:GITHUB_RUN_ID }} ${{ env.SOLUTION_FILE_PATH }} | ||
- name: Upload Artifacts | ||
working-directory: ${{ env.GITHUB_WORKSPACE }} | ||
uses: actions/upload-artifacts@v3 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: src/bin/${{ env.BUILD }}/ |