-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (84 loc) · 3.02 KB
/
build.yml
File metadata and controls
89 lines (84 loc) · 3.02 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build
on:
push:
branches: [ dev ]
workflow_dispatch:
inputs:
publish_mode:
description: 'Publish Mode'
required: true
default: 'If Changed'
type: choice
options:
- If Changed
- Force
- None
plugin_names:
description: 'Publish only these plugins (semicolon-delimited) (optional)'
required: false
default: ''
type: string
run_tests:
description: 'Run Tests'
required: false
default: false
type: boolean
clean:
description: 'Clean build'
required: false
default: false
type: boolean
sign_binaries:
description: 'Sign binaries'
required: false
default: false
type: boolean
linux:
description: 'Release for Linux'
required: false
default: true
type: boolean
windows:
description: 'Release for Windows'
required: false
default: true
type: boolean
run-name: >-
${{ ((github.event_name == 'push') && format('Build Only: {0}', github.event.head_commit.message)) ||
(github.event.inputs.publish_mode == 'If Changed') && 'Build & Release' ||
(github.event.inputs.publish_mode == 'Force') && 'Build & Release (Force)' ||
'Build Only' }}
concurrency:
group: single
cancel-in-progress: false
jobs:
set-build-number:
name: Set Build Number
runs-on: self-hosted
outputs:
build_number: ${{ steps.offset-build-number.outputs.build_number }}
steps:
- name: Offset Build Number
id: offset-build-number
shell: bash
run: |
BUILD_NUMBER=$(( ${{ github.run_number }} + 755 ))
echo "build_number=$BUILD_NUMBER" >> $GITHUB_OUTPUT
call-release-plugins:
name: Build
needs: set-build-number
uses: nodos-dev/actions/.github/workflows/plugins.yml@main
secrets:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
NODOS_STORE_ACCESS_TOKEN: ${{ secrets.NODOS_STORE_ACCESS_TOKEN }}
SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }}
with:
ref_name: ${{ github.ref_name }}
publish_mode: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_mode || 'None' }}
plugin_names: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.plugin_names || '' }}
clean: ${{ github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.clean) || false }}
build_number: ${{ needs.set-build-number.outputs.build_number }}
sign_binaries: ${{github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.sign_binaries) || false }}
linux: ${{ github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.linux) || github.event_name == 'push' }}
windows: ${{ github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.windows) || github.event_name == 'push' }}
run_tests: ${{ github.event_name == 'workflow_dispatch' && fromJson(github.event.inputs.run_tests) || false }}