-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (26 loc) · 934 Bytes
/
build.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
name: Build
on:
pull_request:
env:
NUGET_PROJECT_PATH: nuget/NIX.Analyzers
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dotnet
uses: actions/setup-dotnet@v1
- name: Restore packages
run: dotnet restore ${{ env.NUGET_PROJECT_PATH }}
- name: Build project
run: dotnet build ${{ env.NUGET_PROJECT_PATH }}/NIX.Analyzers.csproj --no-restore
- name: Pack project
run: dotnet pack ${{ env.NUGET_PROJECT_PATH }}/NIX.Analyzers.csproj /p:NuspecFile=./NIX.Analyzers.nuspec --no-restore --no-build --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: Save package to artifacts
uses: actions/upload-artifact@v3
with:
name: nupkgs
path: ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg