diff --git a/.gitea/workflows/BuildLibrary.yml b/.gitea/workflows/BuildLibrary.yml index bb28650..c520264 100644 --- a/.gitea/workflows/BuildLibrary.yml +++ b/.gitea/workflows/BuildLibrary.yml @@ -25,6 +25,20 @@ jobs: - name: Build library run: dotnet build --configuration Release + + - name: Pack + run: dotnet pack MyLibrary.csproj --configuration Release -o ./artifacts - - name: Run unit tests - run: dotnet test --configuration Release --no-build + - name: Publish to Gitea NuGet + run: | + dotnet nuget add source \ + --username $GITEA_USER \ + --password $GITEA_TOKEN \ + --store-password-in-clear-text \ + --name gitea \ + https://gitea.netzbyte.com/api/packages/$GITEA_USER/nuget/index.json + + dotnet nuget push ./artifacts/*.nupkg --source gitea --skip-duplicate + env: + GITEA_USER: max + GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }} \ No newline at end of file