-
-
Notifications
You must be signed in to change notification settings - Fork 348
70 lines (68 loc) · 2.32 KB
/
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
62
63
64
65
66
67
68
69
70
name: Build CKAN + NetKAN
on:
workflow_call:
inputs:
configuration:
type: string
default: Debug
outputs:
unsigned-artifact-id:
description: Artifact ID of the assets to be signed
value: ${{ jobs.build.outputs.unsigned-artifact-id }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
unsigned-artifact-id: ${{ steps.upload-unsigned-artifact.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
- name: Restore cache for _build/tools
uses: actions/cache@v4
with:
path: _build/tools
key: build-tools-${{ hashFiles('build', 'build.ps1', 'build.cake') }}
- name: Restore cache for _build/cake
uses: actions/cache@v4
with:
path: _build/cake
key: build-cake-${{ hashFiles('build.cake') }}
- name: Restore cache for _build/lib/nuget
uses: actions/cache@v4
with:
path: |
_build/lib/nuget
~/.nuget/packages
key: nuget-oldref-modules-${{ hashFiles('**/packages.config') }}-${{ hashFiles('**/*.csproj') }}
- name: Build ckan.exe and netkan.exe
run: ./build --configuration=${{ inputs.configuration }}
- name: Upload repack artifact
id: upload-repack-artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.configuration }}-repack-unsigned
path: _build/repack/
retention-days: 7
- name: Upload out artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.configuration }}-out-unsigned
path: _build/out/
retention-days: 1
- name: Bundle assets for signing
if: inputs.configuration == 'Release'
run: ./build Prepare-SignPath --configuration=${{ inputs.configuration }} --exclusive
- name: Upload unsigned artifact
id: upload-unsigned-artifact
if: inputs.configuration == 'Release'
uses: actions/upload-artifact@v4
with:
name: unsigned
path: _build/signpath/Release
retention-days: 7
- name: Upload ckan.exe artifact
if: inputs.configuration == 'Release'
uses: actions/upload-artifact@v4
with:
name: ckan.exe
path: _build/repack/Release/ckan.exe
retention-days: 7