Skip to content

Upgrade versions of components in Github Actions #2

Upgrade versions of components in Github Actions

Upgrade versions of components in Github Actions #2

name: dotnet-extensions-ai CI
on:
push:
paths:
- 'dotnet-extensions-ai/**'
- '.github/workflows/dotnet-extensions-ai.yml'
pull_request:
paths:
- 'dotnet-extensions-ai/**'
- '.github/workflows/dotnet-extensions-ai.yml'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: dotnet-extensions-ai
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: dotnet-extensions-ai/global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: dotnet publish -c Release -o ./publish
- name: Upload artifacts
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: dotnet-extensions-ai-artifacts
path: dotnet-extensions-ai/publish