-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (52 loc) · 2.01 KB
/
build.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: "Build"
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
workflow_dispatch:
jobs:
build:
if: github.event_name == 'push' && contains(toJson(github.event.commits), '***NO_CI***') == false && contains(toJson(github.event.commits), '[ci skip]') == false && contains(toJson(github.event.commits), '[skip ci]') == false
name: Build
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_ADD_GLOBAL_TOOLS_TO_PATH: false
DOTNET_MULTILEVEL_LOOKUP: 0
PACKAGE_PROJECT: analyzer\Nall.NEST.MigtarionAnalyzer.Package
VSIX_PROJECT: analyzer\Nall.NEST.MigtarionAnalyzer.Vsix
steps:
- uses: actions/checkout@v4.1.7
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 8.0.401
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/setup-nuget@v2.0.0
- name: Add NuGet Source
run: nuget sources Add -Name "Github" -Source https://nuget.pkg.github.com/nikiforovall/index.json -UserName nikiforovall -Password ${{secrets.GITHUB_TOKEN}}
- name: Build NuGet Package
run: |
msbuild /restore ${{ env.PACKAGE_PROJECT }} /p:Configuration=Release /p:PackageOutputPath=${{ github.workspace }}\artifacts
- name: Build VSIX Package
run: |
msbuild /restore ${{ env.VSIX_PROJECT }} /p:Configuration=Release /p:OutDir=${{ github.workspace }}\artifacts
- name: Push to GitHub Packages
run: nuget push ${{ github.workspace }}\artifacts\*.nupkg -Source "Github"
# upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v3.2.1
with:
name: release-pacakges
path: |
${{ github.workspace }}\artifacts\**\*.vsix
${{ github.workspace }}\artifacts\**\*.nupkg