forked from shaka-project/shaka-packager
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (69 loc) · 2.03 KB
/
github-nightly.yaml
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
# Copyright 2023 Pluto TV
# Copyright 2022 Google LLC
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
name: GitHub Nightly Build
on:
push:
branches: [ feature/TRANS-4831-nighty-builds ]
workflow_dispatch:
env:
DEVELOPMENT_BRANCH: "pluto-cmake"
ARTIFACT_NAME: "nightly"
jobs:
build_linux:
name: Build artifacts and upload to GitHub
runs-on: ubuntu-latest
steps:
- name: Install build tools
run: |
sudo apt update && sudo apt install -y \
cmake
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ env.DEVELOPMENT_BRANCH }}
submodules: recursive
- name: Generate build files
run: |
mkdir -p build/
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_SHARED_LIBS=1 \
-S . \
-B build/
- name: Build
run: cmake --build build/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: build/packager/libpackager.so
draft_release:
needs: [build_linux]
name: Create GitHub nightly draft release
runs-on: ubuntu-latest
outputs:
release_id: ${{ steps.draft_release.outputs.id }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
- name: Draft release
id: draft_release
uses: ncipollo/[email protected]
with:
allowUpdates: true
replacesArtifacts: true
artifacts: ${{ env.ARTIFACT_NAME }}.zip
token: ${{ secrets.BUILD_TOKEN_EPHEMERAL}}
commit: ${{ env.DEVELOPMENT_BRANCH }}
name: "Nightly Build"
tag: "nightly"
draft: true
body: "Latest build of the development branch"