Skip to content

Create auto-merge.yaml #2

Create auto-merge.yaml

Create auto-merge.yaml #2

Workflow file for this run

name: Matrix Build
on: push
jobs:
build:
name: '.NET ${{ matrix.dotnet }} on ${{ matrix.os }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macOS-latest']
dotnet: ['3.0.100']
steps:
- uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet }}
- run: dotnet restore
- run: dotnet build -c Release
- run: dotnet test -c Release src/WakeOnLan.Tests/WakeOnLan.Tests.csproj
publish:
name: 'Publish to NuGet and GitHub Releases'
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.0.100'
- run: dotnet build -c Release
- name: 'Publish to NuGet'
run: dotnet nuget push -k "$NUGET_KEY" -s https://api.nuget.org/v3/index.json src/WakeOnLan/bin/Release/*.nupkg
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
- name: 'Publish as GitHub Release'
uses: softprops/action-gh-release@v1
with:
files: src/WakeOnLan/bin/Release/*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}