2023-06-14 15:40:09 +00:00
|
|
|
|
|
|
|
name: release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
jobs:
|
|
|
|
create-release:
|
|
|
|
name: create-release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.release.outputs.upload_url }}
|
|
|
|
lnav_version_number: ${{ env.LNAV_VERSION_NUMBER }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Make release notes
|
|
|
|
run: make -C release release-NEWS.md
|
|
|
|
- name: Get the release version from the tag
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
# Apparently, this is the right way to get a tag name. Really?
|
|
|
|
#
|
|
|
|
# See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
|
|
|
|
echo "LNAV_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
|
|
echo "LNAV_VERSION_NUMBER=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
|
|
|
echo "version is: ${{ env.LNAV_VERSION }}"
|
|
|
|
- name: Create GitHub release
|
|
|
|
id: release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ env.LNAV_VERSION }}
|
|
|
|
release_name: ${{ env.LNAV_VERSION }}
|
|
|
|
body_path: release/release-NEWS.md
|
|
|
|
draft: true
|
|
|
|
|
2023-06-15 13:16:01 +00:00
|
|
|
build-binaries:
|
|
|
|
name: build-binaries
|
2023-06-14 19:54:53 +00:00
|
|
|
needs: ['create-release']
|
|
|
|
uses: ./.github/workflows/bins.yml
|
|
|
|
secrets: inherit
|
|
|
|
with:
|
|
|
|
lnav_version_number: ${{ needs.create-release.outputs.lnav_version_number }}
|
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
|
|
|
|
2023-06-14 15:40:09 +00:00
|
|
|
build-release:
|
|
|
|
name: build-release
|
|
|
|
needs: ['create-release']
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
2023-06-14 15:43:08 +00:00
|
|
|
- name: Update apt
|
|
|
|
run: sudo apt-get update
|
|
|
|
- name: Install packages
|
|
|
|
run: >-
|
|
|
|
sudo apt-get install -y
|
|
|
|
make
|
|
|
|
automake
|
|
|
|
autoconf
|
|
|
|
g++
|
|
|
|
libpcre2-dev
|
|
|
|
libpcre3-dev
|
|
|
|
libncurses-dev
|
|
|
|
libsqlite3-dev
|
|
|
|
libbz2-dev
|
|
|
|
libcurl4-openssl-dev
|
|
|
|
libreadline-dev
|
|
|
|
zlib1g-dev
|
2023-06-14 15:40:09 +00:00
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
|
|
|
run: ./configure --disable-static
|
|
|
|
- name: make dist
|
2023-06-14 16:17:02 +00:00
|
|
|
run: >-
|
|
|
|
make dist dist-bzip2 &&
|
2023-07-03 04:16:02 +00:00
|
|
|
mv -n lnav-*.tar.gz lnav-${{ needs.create-release.outputs.lnav_version_number }}.tar.gz &&
|
|
|
|
mv -n lnav-*.tar.bz2 lnav-${{ needs.create-release.outputs.lnav_version_number }}.tar.bz2
|
2023-06-14 15:40:09 +00:00
|
|
|
- name: Upload tgz archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
2023-06-14 16:04:04 +00:00
|
|
|
asset_path: lnav-${{ needs.create-release.outputs.lnav_version_number }}.tar.gz
|
|
|
|
asset_name: lnav-${{ needs.create-release.outputs.lnav_version_number }}.tar.gz
|
2023-06-14 15:40:09 +00:00
|
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload tbz2 archive
|
|
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
2023-06-14 16:04:04 +00:00
|
|
|
asset_path: lnav-${{ needs.create-release.outputs.lnav_version_number }}.tar.bz2
|
|
|
|
asset_name: lnav-${{ needs.create-release.outputs.lnav_version_number }}.tar.bz2
|
2023-06-14 15:40:09 +00:00
|
|
|
asset_content_type: application/octet-stream
|