Skip to content

Bump Bluehill.Imports from 1.0.7 to 1.0.8 in the default group (#49) #88

Bump Bluehill.Imports from 1.0.7 to 1.0.8 in the default group (#49)

Bump Bluehill.Imports from 1.0.7 to 1.0.8 in the default group (#49) #88

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ "published" ]
jobs:
build:
name: .NET
runs-on: windows-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
OUTPUT_PATH: output
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Cache NuGet
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('Directory.Packages.props') }} #hash of project files
restore-keys: ${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Build (Debug)
run: dotnet build --no-restore
- name: Test (Debug)
run: dotnet test --no-build --verbosity normal
- name: Build (Release)
run: dotnet build --configuration Release --no-restore
- name: Pack (Release)
run: dotnet pack --configuration Release --no-build --output ${{ env.OUTPUT_PATH }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}.nupkg
path: ${{ env.OUTPUT_PATH }}/*.*nupkg
publish:
name: Publish to NuGet
if: ${{ github.event_name == 'release' }}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Download Package artifact
uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}.nupkg
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
files: "*.nupkg"
- name: Publish to Nuget
run: 'dotnet nuget push "*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} --skip-duplicate'