2023-06-12 04:08:28 +00:00
|
|
|
name: bins
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2023-06-12 15:30:49 +00:00
|
|
|
paths-ignore:
|
|
|
|
- docs
|
2023-06-14 19:54:53 +00:00
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
lnav_version_number:
|
|
|
|
description: The version number of the release
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
upload_url:
|
|
|
|
description: The URL to upload release assets
|
|
|
|
required: false
|
|
|
|
type: string
|
2023-06-12 04:08:28 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2023-06-12 12:59:05 +00:00
|
|
|
container:
|
|
|
|
image: tstack/lnav-build:1
|
2023-06-14 19:54:53 +00:00
|
|
|
env:
|
|
|
|
LNAV_BASENAME: lnav-${{ inputs.lnav_version_number }}
|
2023-06-14 21:24:44 +00:00
|
|
|
LNAV_ZIPNAME: lnav-${{ inputs.lnav_version_number }}-x86_64-linux-musl.zip
|
2023-06-12 04:08:28 +00:00
|
|
|
steps:
|
2023-06-12 15:30:49 +00:00
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-06-12 04:08:28 +00:00
|
|
|
- name: make
|
2023-06-12 12:59:05 +00:00
|
|
|
run: /entrypoint.sh
|
2023-06-14 19:54:53 +00:00
|
|
|
- name: Build musl package
|
|
|
|
if: ${{ inputs.lnav_version_number != '' }}
|
|
|
|
run: >-
|
2023-06-14 21:37:21 +00:00
|
|
|
mkdir ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cd ${{ env.LNAV_BASENAME }} &&
|
|
|
|
cp ../NEWS.md ../README . &&
|
|
|
|
cp ../lbuild/src/lnav . &&
|
|
|
|
cd .. &&
|
2023-06-14 19:54:53 +00:00
|
|
|
zip -r ${{ env.LNAV_ZIPNAME }} ${{ env.LNAV_BASENAME }}
|
2023-06-12 15:30:49 +00:00
|
|
|
- name: Upload a Build Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
# Artifact name
|
|
|
|
name: lnav-linux-musl-64bit.zip
|
|
|
|
# A file, directory or wildcard pattern that describes what to upload
|
2023-06-12 15:41:46 +00:00
|
|
|
path: lbuild/src/lnav
|
2023-06-14 19:54:53 +00:00
|
|
|
- name: Upload musl-binary archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
if: ${{ inputs.upload_url != '' }}
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2023-06-14 21:50:30 +00:00
|
|
|
upload_url: ${{ inputs.upload_url }}
|
2023-06-14 19:54:53 +00:00
|
|
|
asset_path: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_name: ${{ env.LNAV_ZIPNAME }}
|
|
|
|
asset_content_type: application/octet-stream
|