Skip to content

Remove mention of packages #66

Remove mention of packages

Remove mention of packages #66

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.419
8.0.201
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:BuildNumber=${{ github.run_number }}
- name: Ensure Playwright browsers are installed
run: pwsh test/SmartComponents.E2ETest.Blazor/bin/Debug/net8.0/playwright.ps1 install chromium --with-deps
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: dotnet pack -c Release /p:BuildNumber=${{ github.run_number }}
- name: Benchmark
run: cd benchmark/SmartComponents.LocalEmbeddings.Benchmark && dotnet run -c Release -- --filter "*"
- name: Upload artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: nuget-packages
path: artifacts/*.nupkg
if-no-files-found: error
- name: Check if publishing
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest'
id: check-if-publishing
shell: bash
run: |
if [ "${{ secrets.NUGET_API_KEY }}" != '' ]; then
echo "should_publish_to_nuget=true" >> $GITHUB_OUTPUT;
fi
- name: Publish to NuGet.org
if: ${{ steps.check-if-publishing.outputs.should_publish_to_nuget == 'true' }}
run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}