Skip to content

Commit

Permalink
Add Publish Nuget Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ritasker committed Aug 8, 2024
1 parent 1ca2d2e commit 36e0185
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
name: .Net Build
on:
pull_request: null
pull_request:
push:
branches:
- master
tags:
- "*"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -25,4 +23,4 @@ jobs:
- name: Update Submodules
run: git submodule update --init --recursive
- name: Build
run: dotnet build --configuration Release --nologo
run: dotnet build --configuration Release --nologo
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Publish Nuget
on:
push:
tags:
- "*"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
publish:
name: Publish Nuget
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.*
- name: Publish Reason
run: echo ${{github.ref}} and ${{github.event_name}}
- name: Get version from tag
run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: publish on version change
uses: brandedoutcast/publish-nuget@v2
with:
PROJECT_FILE_PATH: src\Carter.SirenNegotiator.csproj
PACKAGE_NAME: Carter.SirenNegotiator
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
VERSION_STATIC: ${{ env.VERSION }}

0 comments on commit 36e0185

Please sign in to comment.