Skip to content

use correct framework #90

use correct framework

use correct framework #90

Workflow file for this run

name: .NET Core - build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Install dependencies
run: dotnet restore toolsrc
- name: Build
run: dotnet build --configuration Release --no-restore toolsrc
- name: Test
run: dotnet test --no-restore --verbosity normal toolsrc
- name: Pack
run: dotnet pack toolsrc/Chloroplast.Core/
- name: Pack Tool
run: dotnet pack toolsrc/Chloroplast.Tool/
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: chloroplast_tool
path: toolsrc/Chloroplast.Tool/nupkg/*.nupkg
- name: Add private GitHub registry to NuGet
if: github.ref == 'refs/heads/main'
run: dotnet nuget add source https://nuget.pkg.github.com/WildernessLabs/index.json --name "github" --username WildernessLabs --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tool Core generated package to GitHub registry
if: github.ref == 'refs/heads/main'
run: dotnet nuget push ./toolsrc/Chloroplast.Core/nupkg/*.nupkg --source "github" --skip-duplicate --no-symbols true
env:
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0
- name: Tool Push generated package to GitHub registry
if: github.ref == 'refs/heads/main'
run: dotnet nuget push ./toolsrc/Chloroplast.Tool/nupkg/*.nupkg --source "github" --skip-duplicate --no-symbols true
env:
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0
- name: Tool Push generated package to nuget.org registry
if: github.ref == 'refs/heads/main'
run: dotnet nuget push ./toolsrc/Chloroplast.Tool/nupkg/*.nupkg --source "nuget.org" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate --no-symbols true
env:
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0