-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.13 KB
/
Copy pathcd.yml
File metadata and controls
49 lines (39 loc) · 1.13 KB
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
name: CD
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'eng/CurrentVersion.props'
env:
WORKING_DIR: ${{ github.workspace }}
SOLUTION_PATH: '${{ github.workspace }}\CompilerPlatform.slnx'
jobs:
publish:
runs-on: windows-latest
environment: NuGet
strategy:
matrix:
configuration: [CSharp, VisualBasic]
env:
CONFIGURATION: ${{ matrix.configuration }}
steps:
- name: Checkout the repository
uses: actions/checkout@v6
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v3
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
- name: Restore
run: |
msbuild $env:SOLUTION_PATH /t:Restore /p:Configuration=$env:CONFIGURATION
- name: Build
run: |
msbuild $env:SOLUTION_PATH /t:Build /p:Configuration=$env:CONFIGURATION /p:PackageOutputPath=$env:WORKING_DIR\bin
- name: Publish to NuGet
run: dotnet nuget push .\bin\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json