-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.73 KB
/
ci.yml
File metadata and controls
56 lines (49 loc) · 1.73 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
50
51
52
53
54
55
56
name: CI
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
# Job 1: Build Everything (Triggers on [BUILD])
build-all:
if: contains(github.event.head_commit.message, '[BUILD]')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore Msdfgen.Net.sln
- name: Build All
run: dotnet build Msdfgen.Net.sln --no-restore -c Release
# Job 2: Build & Publish Libraries (Triggers on [PUBLISH])
publish-libs:
if: contains(github.event.head_commit.message, '[PUBLISH]') && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
# Core
- name: Restore Core
run: dotnet restore Msdfgen.Core/Msdfgen.Core.csproj
- name: Pack Core
run: dotnet pack Msdfgen.Core/Msdfgen.Core.csproj --no-restore -c Release -o nupkgs
# AtlasGen
- name: Restore AtlasGen
run: dotnet restore MsdfAtlasGen/MsdfAtlasGen.csproj
- name: Pack AtlasGen
run: dotnet pack MsdfAtlasGen/MsdfAtlasGen.csproj --no-restore -c Release -o nupkgs
# Extensions
- name: Restore Extensions
run: dotnet restore Msdfgen.Extensions/Msdfgen.Extensions.csproj
- name: Pack Extensions
run: dotnet pack Msdfgen.Extensions/Msdfgen.Extensions.csproj --no-restore -c Release -o nupkgs
# Publish
- name: Push to NuGet
run: dotnet nuget push nupkgs/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json