Skip to content

minor: add playground console (#16) #31

minor: add playground console (#16)

minor: add playground console (#16) #31

Workflow file for this run

name: Publish Differ.DotNet
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
- name: Restore
run: dotnet restore ./source/Perun.Differ.sln
- name: Test
run: dotnet test ./source/Perun.Differ.sln --no-restore
- name: Build
run: dotnet build ./source/Perun.Differ.sln --configuration Release --no-restore
- name: Pack NuGet package
run: dotnet pack ./source/Perun.Differ.sln --configuration Release --include-symbols --no-build --no-restore
- name: Get NuGet version
id: nuget_version
run: |
version=$(grep -oP '(?<=<Version>).*(?=</Version>)' ./source/Directory.Build.props)
echo "::set-output name=version::$version"
- name: Publish to NuGet.org
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate -k ${{ secrets.NUGET_API_KEY }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.nuget_version.outputs.version }}
release_name: Release ${{ steps.nuget_version.outputs.version }}
draft: false
prerelease: false