-
Notifications
You must be signed in to change notification settings - Fork 25
107 lines (102 loc) · 3.61 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build all Platforms
on:
push:
pull_request:
branches: [ master ]
workflow_dispatch: # Can also be called manually for whatever reason
# Let's set all project specific definitions globally
env:
PRJ_NAME: LiveTraffic # The plugin's name, expected to be the .xpl file's name and used as the plugin folder name
# On master branches or when explicitely tagged we build prod versions, otherwise BETA
version_beta: ${{ (github.ref != 'refs/heads/master' && github.ref_type != 'tag') && '1' || '0' }}
jobs:
#####################################
# Linux with GCC
build-lin:
runs-on: ubuntu-20.04
env:
platform: lin
steps:
- name: Checkout Code
uses: actions/checkout@v4 # must checkout before we can use our own actions
with:
submodules: 'recursive'
- name: Build
uses: ./.github/actions/build-lin
id: build
with:
pluginName: ${{ env.PRJ_NAME }}
- name: Upload Artifact
uses: ./.github/actions/upload-plugin
with:
pluginName: ${{ env.PRJ_NAME }}
archFolder: lin_x64
xplFileName: "${{ steps.build.outputs.xpl-file-name }}"
pdbFileName: "${{ steps.build.outputs.pdb-file-name }}"
#####################################
# MacOS with CMake/clang and sign/notarize in self-written script
build-mac:
runs-on: macos-14
env:
platform: mac
steps:
- name: Checkout Code
uses: actions/checkout@v4 # must checkout before we can use our own actions
with:
submodules: 'recursive'
- name: Build
uses: ./.github/actions/build-mac
id: build
with:
pluginName: ${{ env.PRJ_NAME }}
- name: Check if Secrets available
id: checksecrets
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
shell: bash
run: |
if [ "$MACOS_CERTIFICATE" == "" ]; then
echo "secretspresent=" >> $GITHUB_OUTPUT
else
echo "secretspresent=true" >> $GITHUB_OUTPUT
fi
- name: Codesign and Notarization
if: ${{ steps.checksecrets.outputs.secretspresent }}
uses: ./.github/actions/sign-notarize
with:
xplFileName: ${{ steps.build.outputs.xpl-file-name }}
certificate: ${{ secrets.MACOS_CERTIFICATE }}
certPwd: ${{ secrets.MACOS_CERT_PWD }}
notarizeUser: ${{ secrets.NOTARIZATION_USERNAME }}
notarizeTeam: ${{ secrets.NOTARIZATION_TEAM }}
notarizeAppPwd: ${{ secrets.NOTARIZATION_PASSWORD }}
- name: Upload Artifact
uses: ./.github/actions/upload-plugin
with:
pluginName: ${{ env.PRJ_NAME }}
archFolder: mac_x64
xplFileName: "${{ steps.build.outputs.xpl-file-name }}"
pdbFileName: "${{ steps.build.outputs.pdb-file-name }}"
#####################################
# Windows with MS Visual Studio
build-win:
runs-on: windows-2022
env:
platform: win
steps:
- name: Checkout Code
uses: actions/checkout@v4 # must checkout before we can use our own actions
with:
submodules: 'recursive'
- name: Build
uses: ./.github/actions/build-win
id: build
with:
pluginName: ${{ env.PRJ_NAME }}
- name: Upload Artifact
uses: ./.github/actions/upload-plugin
with:
pluginName: ${{ env.PRJ_NAME }}
archFolder: win_x64
xplFileName: "${{ steps.build.outputs.xpl-file-name }}"
pdbFileName: "${{ steps.build.outputs.pdb-file-name }}"