Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MrScautHD authored Aug 25, 2024
1 parent 91f55ca commit b66ef76
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build Bliss


on:
release:
types: [ "published" ]
Expand Down Expand Up @@ -35,3 +36,31 @@ jobs:
# Test
- name: Test
run: dotnet test --no-build --verbosity normal

# Publish to NuGet
publish-nuget:
runs-on: ubuntu-latest

# Run
steps:
- uses: actions/checkout@v4

# Setup .NET
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

# Restore dependencies
- name: Restore dependencies
run: dotnet restore

# Build and pack NuGet package
- name: Pack NuGet package
if: github.event_name == 'release'
run: dotnet pack src/Bliss -p:PackageVersion=${{ github.event.release.tag_name }} --configuration Release --output nuget

# Publish NuGet package
- name: Publish NuGet package
if: github.event_name == 'release'
run: dotnet nuget push nuget/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit b66ef76

Please sign in to comment.