Commit for v0.2.0 #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |