RGB.NET-Release #7
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: RGB.NET-Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'version' | |
| required: true | |
| type: string | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 10.0.x | |
| 9.0.x | |
| 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release /p:Version=${{ github.event.inputs.version }} | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal --configuration Release | |
| - name: Upload a Build Artifact NET10 | |
| uses: actions/upload-artifact@v4.3.1 | |
| with: | |
| name: RGB.NET-NET10 | |
| path: bin/net10.0/RGB.NET.*.dll | |
| if-no-files-found: error | |
| - name: Upload a Build Artifact NET9 | |
| uses: actions/upload-artifact@v4.3.1 | |
| with: | |
| name: RGB.NET-NET9 | |
| path: bin/net9.0/RGB.NET.*.dll | |
| if-no-files-found: error | |
| - name: Upload a Build Artifact NET8 | |
| uses: actions/upload-artifact@v4.3.1 | |
| with: | |
| name: RGB.NET-NET8 | |
| path: bin/net8.0/RGB.NET.*.dll | |
| if-no-files-found: error | |
| - name: Upload Nuget Build Artifact | |
| uses: actions/upload-artifact@v4.3.1 | |
| with: | |
| name: RGB.NET-Nugets | |
| path: bin/*nupkg | |
| if-no-files-found: error | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ github.event.inputs.version }} | |
| generate_release_notes: true | |
| files: bin/net10.0/RGB.NET.*.dll | |
| - name: Nuget Push | |
| run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json |