2.18.0 #41
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 | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| net48-tests: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Test .NET Framework 4.8 | |
| run: dotnet test src/S7CommPlusDriver.Tests/S7CommPlusDriver.Tests.csproj --configuration Release --framework net48 | |
| build: | |
| needs: [net48-tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fetch history | |
| run: git fetch --prune --unshallow | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 8.0.x | |
| 9.0.x | |
| - name: Restore dependencies | |
| run: | | |
| dotnet restore src/S7CommPlusDriver | |
| dotnet restore src/DriverTest | |
| dotnet restore src/S7CommPlusGUIBrowser | |
| - name: Update project version | |
| uses: roryprimrose/set-vs-sdk-project-version@v1 | |
| with: | |
| version: ${{ github.event.release.tag_name }} | |
| assemblyVersion: ${{ github.event.release.tag_name }} | |
| fileVersion: ${{ github.event.release.tag_name }} | |
| informationalVersion: ${{ github.event.release.tag_name }}-${{ github.sha }} | |
| - name: Build | |
| run: | | |
| dotnet build --configuration Release src/S7CommPlusDriver | |
| dotnet build --configuration Release src/DriverTest | |
| dotnet build --configuration Release src/S7CommPlusGUIBrowser | |
| - name: Test .NET 8 | |
| run: dotnet test src/S7CommPlusDriver.Tests/S7CommPlusDriver.Tests.csproj --configuration Release --framework net8.0 | |
| - name: Publish | |
| run: | | |
| dotnet nuget push --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json src/S7CommPlusDriver/bin/Release/*.nupkg |