Skip to content

Commit

Permalink
Update dotnet-desktop.yml
Browse files Browse the repository at this point in the history
Pack with tag
  • Loading branch information
cwinland authored Oct 20, 2023
1 parent 776b7b6 commit 16c5ec2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: publish to nuget
on:
release:
types: [published]
push:
branches:
- master # Release branch
paths:
- Wpf.NotificationCenter/**
- .github/workflows/**

jobs:
Expand All @@ -24,9 +25,16 @@ jobs:
# Publish
- name: Build FastMoq
run: dotnet build Wpf.NotificationCenter/Wpf.NotificationCenter.csproj -c Release


- name: Fetch all tags
run: git fetch --tags

- name: Get latest tag
id: gettag
run: echo ::set-output name=TAG::$(git describe --tags $(git rev-list --tags --max-count=1))

- name: Creating a package
run: dotnet pack Wpf.NotificationCenter/Wpf.NotificationCenter.csproj --no-build -c Release -o .
run: dotnet pack Wpf.NotificationCenter/Wpf.NotificationCenter.csproj --no-build -c Release -o . /p:PackageVersion=${{ steps.gettag.outputs.TAG }}

- name: Publish to Nuget
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate -n

0 comments on commit 16c5ec2

Please sign in to comment.