-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 1.55 KB
/
release.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
name: Build, Upload, and Release Assets
on:
push:
tags:
- '*'
permissions:
contents: write # required for creating release and uploading assets
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-upload:
name: Build and Upload
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install deps (Ubuntu)
if: runner.os == 'Linux'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: lttng-tools lttng-modules-dkms babeltrace2 liblttng-ust-dev python3-babeltrace cmake build-essential
version: 1.0
- name: Build
run: ./build.sh
- name: Compress build output
run: |
tar czf ${{ matrix.os }}-build.tar.gz build/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-build
path: ${{ matrix.os }}-build.tar.gz
retention-days: 1
create-release:
name: Create Release
needs: build-and-upload
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
make_latest: true
generate_release_notes: true
files: |
ubuntu-latest-build/ubuntu-latest-build.tar.gz
macos-latest-build/macos-latest-build.tar.gz