Skip to content

Build

Build #16

Workflow file for this run

name: Build
on:
push:
paths:
- '.github/workflows/build.yml'
- 'src/**'
workflow_dispatch:
inputs:
publish:
description: 'Publish package'
default: false
required: false
type: boolean
jobs:
build:
env:
BUILD_CONFIG: release
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build -c ${{ env.BUILD_CONFIG }} --no-restore -p:ContinuousIntegrationBuild=true
#- name: Test
# run: dotnet test -c ${{ env.BUILD_CONFIG }} --no-restore
- name: Publish
if: ${{ inputs.publish }}
run: |
dotnet pack -c ${{ env.BUILD_CONFIG }} --no-build
dotnet nuget push build_output/packages/*.nupkg -k ${{ secrets.NUGETTEST_API_KEY }} -s https://apiint.nugettest.org/v3/index.json