Merge pull request #5 from crispthinking/copilot/fix-minver-configura… #1
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: CI | |
| # Trigger on pushes and pull requests to the main branch. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| workflow_call: # Allows the workflow to be called by other workflows | |
| # Set permissions for the workflow. | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| checks: write | |
| packages: read | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_NOLOGO: 1 | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false # This allows the matrix jobs to run independently. | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore FastText.NetWrapper.sln | |
| - name: Build | |
| run: dotnet build FastText.NetWrapper.sln --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test FastText.NetWrapper.sln --configuration Release --no-build --logger "trx" --logger "console;verbosity=normal" | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.os }} | |
| path: "**/*.trx" | |
| - name: Pack | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: dotnet pack FastText.NetWrapper --configuration Release --no-build --output Artifacts | |
| - name: Upload NuGet packages | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifacts | |
| path: Artifacts/*.nupkg |