-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 1.14 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Update NuGet
on: [push]
jobs:
build:
runs-on: windows-latest
name: Publish Nuget Package
steps:
- uses: actions/checkout@master
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.x
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET Core 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Run Tests
run:
dotnet test "./tests/Blend.XmlLexer.Tests/Blend.XmlLexer.Tests.csproj"
- name: Build Package
run:
dotnet build -c Release "./src/Blend.XmlLexer/Blend.XmlLexer.csproj"
- name: Package Release
run:
dotnet pack -c Release --no-build -o out "./src/Blend.XmlLexer/Blend.XmlLexer.csproj"
- name: Publish Nuget to GitHub registry
run: ls .\out\*.nupkg | foreach { dotnet nuget push $_ -s https://nuget.pkg.github.com/blendinteractive/index.json -k $env:GITHUB_TOKEN }
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}