2024-02-04 10:57:40 +01:00
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
build-publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v3
|
|
|
|
with:
|
|
|
|
dotnet-version: '8.0.x'
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build
|
|
|
|
- name: Test
|
|
|
|
run: dotnet test --collect:"XPlat Code Coverage"
|
|
|
|
- name: Pack
|
|
|
|
run: dotnet pack --version-suffix ci.$GITHUB_RUN_NUMBER
|
|
|
|
- name: Publish
|
|
|
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
2024-02-04 11:11:23 +01:00
|
|
|
run: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k '${{ secrets.BAGET_KEY }}' -n
|