Skip to content

Commit

Permalink
Add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo committed Aug 25, 2022
1 parent b126042 commit 35f0670
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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.NUGET_API_KEY }} -s https://apiint.nugettest.org/v3/index.json

0 comments on commit 35f0670

Please sign in to comment.