Skip to content

master -> main

master -> main #1049

Workflow file for this run

name: Build and package
on:
push:
paths-ignore:
- 'docs/**'
branches:
- main
- release/**
tags:
- "*"
pull_request:
branches: [main]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x
- name: Build packages
shell: pwsh
run: |
./build.ps1 -Output ./artifacts -CurrentBranch $Env:GITHUB_REF_NAME
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Publish build artifacts
uses: actions/upload-artifact@v2
with:
name: Packages
path: |
./artifacts/*.nupkg
- name: Publish to nuget
if: github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/')
shell: pwsh
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
run: |
dotnet nuget push "./artifacts/*.nupkg" -k $Env:NUGET_KEY -s https://api.nuget.org/v3/index.json