Skip to content

Bump Microsoft.CSharp, Scriban and System.Threading.Tasks.Extensions #198

Bump Microsoft.CSharp, Scriban and System.Threading.Tasks.Extensions

Bump Microsoft.CSharp, Scriban and System.Threading.Tasks.Extensions #198

name: Test and Publish
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
on:
push:
pull_request:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build
push:
name: NuGet Push
runs-on: windows-latest
needs: [build]
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Generate NuGet packages
run: dotnet pack --configuration Release --no-build --output ./packages
- uses: actions/upload-artifact@v4
with:
name: Artifacts
path: ./packages/
- name: Publish packages
run: |
Get-ChildItem -Path ./packages/ -Filter *.nupkg -File -Name | ForEach-Object {
dotnet nuget push ./packages/$_ --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate
}
shell: pwsh
# TODO: Fix when I can be bothered to.
# train:
# name: Intellicode Train
# runs-on: windows-latest
# needs: [build]
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0 # We need to fetch the entire Git history in order to verify the authenticity.
# - name: Setup .NET
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: |
# 6.0.x
# 7.0.x
# 8.0.x
# - name: Install dependencies
# run: dotnet restore
# - name: Build
# run: dotnet build --configuration Release --no-restore
# - name: Train Intellicode Model
# uses: microsoft/vs-intellicode@v1