Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
release:
types:
- created
jobs:
release-libelf:
runs-on: ubuntu-latest
steps:
- name: Install deps
run: |
apt-get update
apt-get install -y m4
- 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
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.event.release.tag_name }}.tar.gz
asset_name: ${{ github.event.release.tag_name }}.tar.gz
asset_content_type: application/gzip