-
-
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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
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@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.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@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
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