-
-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (51 loc) · 1.74 KB
/
CI-CD.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
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
64
name: "Build and Pack"
on:
push:
branches: [ master ]
tags: [ v* ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: 6.0.x
- name: Restore Windows
run: dotnet restore --runtime=win10-x64
- name: Build Windows
run: dotnet build IdlImpTool --no-restore --runtime=win10-x64
- name: Restore Linux
run: dotnet restore --runtime=linux-x64
- name: Build Linux
run: dotnet build IdlImpTool --no-restore --runtime=linux-x64
- name: Pack IdlImporter (also builds any runtime)
run: dotnet pack IDLImporter --include-symbols --no-restore -o .
- name: Pack IdlImpTool Everything (also builds any runtime)
run: dotnet pack IdlImpTool --include-symbols --no-restore -o .
- name: Publish Artifacts
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: NugetPackages
path: |
./*.nupkg
./*.snupkg
publish-nuget:
name: "Publish NuGet package"
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push'
steps:
- name: Download Artifacts
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
path: artifacts
- name: Publish to Nuget
run: dotnet nuget push artifacts/**/*.*nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.SILLSDEV_PUBLISH_NUGET_ORG}} --skip-duplicate