-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.14 KB
/
release.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
name: Release
on:
release:
types:
- created
permissions:
contents: write
jobs:
release-libelf:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Check release tag
id: check_tag
run: |
if [[ "${{ github.event.release.tag_name }}" != libelf-* ]]; then
echo "This release tag does not start with 'libelf-', skipping."
exit 0
fi
- name: Generate m4 files
run: |
cd common/sys
m4 -I$(pwd) -D SRCDIR=$(pwd) elfdefinitions.m4 > elfdefinitions.h
cd ../../libelf
m4 -D SRCDIR=$(pwd) libelf_fsize.m4 > libelf_fsize.c
m4 -D SRCDIR=$(pwd) libelf_msize.m4 > libelf_msize.c
m4 -D SRCDIR=$(pwd) libelf_convert.m4 > libelf_convert.c
- name: Create tar.gz package
run: |
tar -czvf ${{ github.event.release.tag_name }}.tar.gz common/ libelf/ CMakeLists.txt
- name: Upload release asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} ${{ github.event.release.tag_name }}.tar.gz