-
Notifications
You must be signed in to change notification settings - Fork 11
61 lines (48 loc) · 1.38 KB
/
02-build.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
name: Build
on:
workflow_call:
inputs:
tag:
required: true
type: string
jobs:
build-nuget:
runs-on: ubuntu-latest
steps:
- name: Restore versioned sources
uses: actions/cache/restore@v4
with:
path: |
!**/.git
**/*
key: cache-${{ github.sha }}
enableCrossOsArchive: true
- uses: actions/setup-dotnet@v4
- run: dotnet restore NuGetOnly.slnf
- run: dotnet build NuGetOnly.slnf -c Release --no-restore
- run: dotnet pack NuGetOnly.slnf -c Release --no-build -o ./nupkg -p:Version=${{ inputs.tag }}
- uses: actions/cache/save@v4
with:
path: nupkg
key: cache-${{ github.sha }}
enableCrossOsArchive: true
build-tool:
runs-on: ubuntu-latest
steps:
- name: Restore versioned sources
uses: actions/cache/restore@v4
with:
path: |
!**/.git
**/*
key: cache-${{ github.sha }}
enableCrossOsArchive: true
- uses: actions/setup-dotnet@v4
- run: dotnet restore ToolOnly.slnf
- run: dotnet build ToolOnly.slnf -c Release --no-restore
- run: dotnet pack ToolOnly.slnf -c Release --no-build -o ./tool -p:Version=${{ inputs.tag }}
- uses: actions/cache/save@v4
with:
path: tool
key: cache-${{ github.sha }}
enableCrossOsArchive: true