Skip to content

Release 0.2.1 (#40) #69

Release 0.2.1 (#40)

Release 0.2.1 (#40) #69

Workflow file for this run

name: .NET
on:
push:
branches:
- develop
- main
- release
pull_request:
branches:
- develop
- main
- release
jobs:
build:
strategy:
matrix:
image:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{matrix.image}}
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Restore dependencies
run: dotnet restore ./Cnct/Cnct.sln
- name: Build
run: dotnet build --no-restore --no-incremental --configuration Release /WarnAsError ./Cnct/Cnct.sln
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release ./Cnct/Cnct.sln
- name: Package
run: dotnet pack --no-build --configuration Release ./Cnct/Cnct.NetCore/Cnct.NetCore.csproj
- name: Publish as GitHub artifact
uses: actions/upload-artifact@v2
with:
name: package
path: ./Cnct/Cnct.NetCore/nupkg/Cnct.*.nupkg
- name: Publish to GitHub Packages
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.image == 'ubuntu-latest' }}
run: dotnet nuget push ./Cnct/Cnct.NetCore/nupkg/Cnct.*.nupkg --skip-duplicate --api-key $NUGET_AUTH_TOKEN
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}