Skip to content

Add workflow build

Add workflow build #2

Workflow file for this run

name: Build
on:
push:
branches:
- master
- develop
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Extract branch name
shell: pwsh
run: |
$branch = $env:GITHUB_REF -replace 'refs/heads/', ''
echo "BRANCH_NAME=$branch" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
if ( $branch == 'develop' ) {
echo "BUILD=Debug" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} else {
echo "BUILD=Release" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- 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

Check failure on line 38 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 38, Col: 7): Unexpected value 'uses' .github/workflows/build.yml (Line: 39, Col: 7): Unexpected value 'with'
with:
name: ${{ github.event.repository.name }}
path: src/bin/${{ env.BUILD }}/