Skip to content

Commit for v0.2.0

Commit for v0.2.0 #10

Workflow file for this run

name: Publish Nuget Package
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
- "v*.*.*-*"
permissions:
contents: read
packages: write
jobs:
publish:
name: "Publish"
runs-on: ubuntu-latest
strategy:
matrix:
project: ["./src/Lib"]
env:
DOTNET_NOLOGO: true
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install .NET tools
run: dotnet tool restore
- name: Update project files with GitVersion
run: dotnet tool run dotnet-gitversion /updateprojectfiles
- name: Configure GitHub package registry source
run: dotnet nuget add source --username Smalls1652 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Smalls1652/index.json"
- name: Run dotnet restore
run: dotnet restore ${{ matrix.project }}
- name: Create package
run: dotnet pack ${{ matrix.project }} --configuration "Release" --no-restore
- name: Publish package
run: dotnet nuget push "./artifacts/package/release/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}