Skip to content

Fix creating release from other branches (#311) #9

Fix creating release from other branches (#311)

Fix creating release from other branches (#311) #9

Workflow file for this run

name: Publish NuGet Package
on:
push:
tags:
- '*'
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Pack
run: dotnet pack --no-build --configuration Release --output ./Release
- name: NuGet Login
uses: NuGet/login@v1
id: login
with:
user: hazzik
- name: NuGet Publish
run: dotnet nuget push ./Release/*.nupkg -s nuget.org -k ${{ steps.login.outputs.NUGET_API_KEY }}