Skip to content

Merge pull request #19 from gitViwe/v4 #87

Merge pull request #19 from gitViwe/v4

Merge pull request #19 from gitViwe/v4 #87

name: Build, Test, Pack and Push
on:
push:
branches:
- main
workflow_dispatch:
jobs:
distro-build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
source-url: https://api.nuget.org/v3/index.json
dotnet-version: 9.x.x
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}
- name: Restore
run: dotnet restore Distro
- name: Build
run: dotnet build Distro --configuration Release
- name: Test
run: dotnet test **/*/Shared.Test.csproj --verbosity normal
env:
TEST_IMGBBCLIENT_APIKEY: ${{secrets.TEST_IMGBBCLIENT_APIKEY}}
- name: Publish NuGet
run: | # | character makes the "run" property multi-line, so we can put multiple commands in the same step
dotnet pack Distro --configuration Release --no-restore
dotnet nuget push "./**/*.nupkg" --skip-duplicate --no-symbols --api-key ${{secrets.NUGET_TOKEN}}
rm -rf __out