Fix up kinds. #149
Workflow file for this run
This file contains 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: 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@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
8.0.x | |
include-prerelease: true | |
- 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@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
8.0.x | |
include-prerelease: true | |
- 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@v2 | |
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@v3 | |
# 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@v2 | |
# with: | |
# dotnet-version: | | |
# 6.0.x | |
# 7.0.x | |
# 8.0.x | |
# include-prerelease: true | |
# - name: Install dependencies | |
# run: dotnet restore | |
# - name: Build | |
# run: dotnet build --configuration Release --no-restore | |
# - name: Train Intellicode Model | |
# uses: microsoft/vs-intellicode@v1 |