-
-
Notifications
You must be signed in to change notification settings - Fork 345
58 lines (49 loc) · 1.37 KB
/
linux_cpn.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
name: Linux Companion
on:
push:
branches:
- 'main'
tags:
- v*
paths:
- '.github/workflows/linux_cpn.yml'
- 'companion/**'
- 'tools/build-companion.sh'
pull_request:
branches:
- 'main'
paths:
- '.github/workflows/linux_cpn.yml'
- 'companion/**'
- 'tools/build-companion.sh'
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/edgetx/edgetx-dev:latest
volumes:
- ${{ github.workspace }}:/src
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: |
mkdir output && \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
- name: Compose release filename
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
run: echo "artifact_name=edgetx-cpn-linux-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: ${{github.workspace}}/output
retention-days: 15