Skip to content

Create build pipelines #1

Create build pipelines

Create build pipelines #1

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
PR_NUMBER: ${{ github.event.number }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -configuration ${{ env.CONFIGURATION }}
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish Artifacts
run: dotnet publish --configuration ${{ env.CONFIGURATION }} --no-build --output "../Artifacts/${{ PR_NUMBER }}"

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

View workflow run for this annotation

GitHub Actions / .NET Build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 33, Col: 12): Unrecognized named-value: 'PR_NUMBER'. Located at position 1 within expression: PR_NUMBER .github/workflows/build.yml (Line: 37, Col: 15): Unrecognized named-value: 'PR_NUMBER'. Located at position 1 within expression: PR_NUMBER
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: "${{ PR_NUMBER }}"
path: "../Artifacts/${{ PR_NUMBER }}"
overwrite: true