Skip to content

Merge pull request #8 from jmayer913/v9.0.0/VersionBranch #35

Merge pull request #8 from jmayer913/v9.0.0/VersionBranch

Merge pull request #8 from jmayer913/v9.0.0/VersionBranch #35

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: MainWorkflow
on:
push:
branches: [ "main" ]
permissions:
packages: write
jobs:
build:
runs-on: windows-latest
steps:
- name: Add GitHub Nuget Source
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/jmayer913/index.json"
continue-on-error: true
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --verbosity normal
- name: Package
run: dotnet pack --configuration Release
- name: Publish
run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
- name: NuGet Publish
run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --source "https://api.nuget.org/v3/index.json"