Skip to content

migrate to .net6

migrate to .net6 #50

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🧰 Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: .\global.json
- name: 💾 Cache dependencies
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.OS }}-nuget-${{ hashFiles('**/paket.lock') }}
restore-keys: |
${{ runner.OS }}-nuget-
${{ runner.OS }}-
- name: 🔨 Build
run: .\build.ps1 --target all
- name: 📦 Upload Artifact
uses: actions/upload-artifact@v3
with:
name: nupkg
path: ./src/Monies/bin/Release/*.nupkg
- name: 📊 Publish coverage report
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: lcov
file: ./src/Monies.Tests/TestResults/coverage.net6.0.info
deploy:
needs: build
if: github.event_name == 'release'
runs-on: windows-latest
env:
GITHUB_FEED: https://nuget.pkg.github.com/ariasemis/index.json
GITHUB_KEY: ${{ secrets.GITHUB_TOKEN }}
NUGET_FEED: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_KEY }}
steps:
- uses: actions/checkout@v3
- name: 🧰 Setup .NET
uses: actions/setup-dotnet@v3
with:
global-json-file: .\global.json
- name: 📦 Download Artifact
uses: actions/download-artifact@v3
with:
name: nupkg
- name: 🚀 Push to GitHub Feed
run: dotnet nuget push **/*.nupkg --source ${{ env.GITHUB_FEED }} --skip-duplicate --api-key ${{ env.GITHUB_KEY }}
- name: 🚀 Push to NuGet Feed
run: dotnet nuget push **/*.nupkg --source ${{ env.NUGET_FEED }} --skip-duplicate --api-key ${{ env.NUGET_KEY }}