Add static plugin initializer, add tree builder and tree node builder #37
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: .NET | |
| env: | |
| GITHUB_USER: Nihlus | |
| GITHUB_FEED: https://nuget.pkg.github.com/Remora | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| on: | |
| - push | |
| - pull_request | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| - name: Build | |
| run: | | |
| dotnet restore | |
| dotnet build -c Release --no-restore | |
| - name: Test | |
| run: dotnet test -c Release --no-restore --no-build --verbosity minimal --collect:"XPlat Code Coverage" --results-directory ./coverage | |
| - name: Inspect | |
| uses: JetBrains/ReSharper-InspectCode@v0.8 | |
| with: | |
| tool-version: 2024.3.0 | |
| solution: Remora.Plugins.sln | |
| build: false | |
| no-build: true | |
| - name: Coverage | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| with: | |
| filename: coverage/**/coverage.cobertura.xml | |
| badge: true | |
| format: markdown | |
| indicators: true | |
| output: both | |
| thresholds: '60 80' | |
| - uses: actions/upload-artifact@v4 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| name: coverage | |
| path: code-coverage-results.md | |
| - name: Package | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| run: dotnet pack -c Release --no-restore --no-build --version-suffix "github$GITHUB_RUN_ID" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: nupkg | |
| path: nuget/* | |
| permissions: | |
| security-events: write | |
| prerelease: | |
| needs: build | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download package artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nupkg | |
| path: nuget | |
| # To ensure that the current version being pushed does not get pruned we prune first. | |
| - name: Prune packages older than 4 versions (new version is the 5th) | |
| uses: smartsquaregmbh/delete-old-packages@v0.8.0 | |
| with: | |
| organization: Remora | |
| type: nuget | |
| keep: 4 | |
| names: | | |
| Remora.Plugins | |
| Remora.Plugins.Abstractions | |
| - name: Push to GitHub Feed | |
| run: | | |
| for f in ./nuget/*; do | |
| curl -vX PUT -u "$GITHUB_USER:$GITHUB_TOKEN" -F package=@$f $GITHUB_FEED | |
| done |