-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (41 loc) · 1.33 KB
/
gen_orig.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
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (C) 2023, Raspberry Pi Ltd
name: Generate source release tarball
run-name: Generating source release tarball
on:
push:
tags: # vX.Y.Z
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
jobs:
publish_tarball:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson pkgconf libboost-log-dev libboost-thread-dev nlohmann-json3-dev
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for 'git describe' to work
- name: Generate tarball
run: |
meson setup build
meson dist --no-tests --include-subprojects -C build
- name: Check for output tarball
run: |
TARBALL="libpisp-$(echo "$GITHUB_REF_NAME" | sed 's/^v//').tar.xz"
if ! [ -f "build/meson-dist/$TARBALL" ]; then
echo "Expected tarball not found - $TARBALL"
echo "Does 'version' in meson.build match the tag?"
exit 1
fi
- name: Release tarball
uses: softprops/action-gh-release@v1
with:
files: build/meson-dist/*.tar.xz
- if: failure()
run: cat build/meson-logs/meson-log.txt