Skip to content

Update dotnet.yml

Update dotnet.yml #3

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:
paths-ignore:
- 'readme.md'
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
packages: write
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Pack
run: dotnet pack --no-build -c Release MemoryEditLib2/MemoryEditLib2.csproj -o .
- name: Publish nuget
run: dotnet nuget push *.nupkg -s https://nuget.pkg.github.com/leanleon93/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate -n 1