chore: Update build workflow to build and publish LSOF binary to a re… #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish LSOF Binary to a Release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc make libc6-dev libtirpc-dev autotools-dev autoconf automake libtool bison flex | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# - name: Compile LSOF | |
# run: | | |
# ./Configure -n linux | |
# make CC='gcc -static' LDFLAGS='-static -static-libgcc' | |
# echo "------ :: LSOF binary is compiled and installed :: ------" | |
# ./lsof -v | |
- name: Gets latest created release info | |
id: latest-release | |
uses: jossef/action-latest-release-info@v1.2.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload LSOF binary to Release | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.latest-release.outputs.upload_url }} | |
asset_path: ./build/lsof-binary | |
asset_name: lsof-binary | |
asset_content_type: application/octet-stream |