Skip to content

[Pull Request] Improvements under Math and Graphics namespace #34

[Pull Request] Improvements under Math and Graphics namespace

[Pull Request] Improvements under Math and Graphics namespace #34

Workflow file for this run

name: Build
on:
push:
branches:
- "main"
paths-ignore:
- ".*/**"
- "**/*.md"
pull_request:
branches:
- "main"
paths-ignore:
- ".*/**"
- "**/*.md"
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
7.0.x
include-prerelease: false
- name: Build
run: |
cd Common.BasicHelper
dotnet build -c Release
- name: Test
run: |
cd Common.BasicHelper.Test
dotnet test -c Release
- name: Add to GitHub Repo
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}
run: |
nuget sources add -name github -Source https://nuget.pkg.github.com/Crequency/index.json -Username Crequency -Password ${{ secrets.GitHubToken }}
- name: Install NuGet
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}
uses: nuget/setup-nuget@v1
with:
nuget-version: "6.x"
- name: Publish Package to GitHub and NuGet
if: ${{ matrix.os == 'ubuntu-latest' && github.event_name != 'pull_request' }}
run: |
nuget push ./Common.BasicHelper/bin/Release/*.nupkg -Source github -SkipDuplicate -Verbosity detailed
nuget push ./Common.BasicHelper/bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol -Verbosity detailed