2023-06-30 16:50:55 +00:00
|
|
|
|
|
|
|
name: RPM Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
2023-07-14 16:15:59 +00:00
|
|
|
- docs
|
|
|
|
- README.md
|
|
|
|
- NEWS.md
|
2023-07-01 04:39:39 +00:00
|
|
|
tags:
|
|
|
|
- '*'
|
2023-06-30 16:50:55 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-23 07:38:21 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-06-30 16:50:55 +00:00
|
|
|
|
2023-07-01 04:42:36 +00:00
|
|
|
- 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 }}"
|
2023-07-01 14:19:32 +00:00
|
|
|
make -C release lnav.spec
|
2023-06-30 16:50:55 +00:00
|
|
|
- name: build RPM package
|
|
|
|
id: rpm
|
2023-06-30 17:22:19 +00:00
|
|
|
uses: tstack/rpmbuild@master
|
2023-06-30 16:50:55 +00:00
|
|
|
with:
|
|
|
|
spec_file: "release/lnav.spec"
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v1.0.0
|
|
|
|
with:
|
|
|
|
name: Binary RPM
|
|
|
|
path: ${{ steps.rpm.outputs.rpm_dir_path }}
|
2023-06-30 21:04:24 +00:00
|
|
|
|
|
|
|
- name: Push to packagecloud.io
|
2023-06-30 21:42:48 +00:00
|
|
|
uses: tstack/upload-packagecloud@main
|
2023-07-03 04:16:02 +00:00
|
|
|
if: github.ref_type == 'tag'
|
2023-06-30 21:04:24 +00:00
|
|
|
with:
|
|
|
|
userrepo: tstack/lnav
|
|
|
|
apitoken: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
2023-06-30 22:02:07 +00:00
|
|
|
packages: ${{ steps.rpm.outputs.rpm_dir_path }}x86_64
|
2023-06-30 21:04:24 +00:00
|
|
|
rpmdists: el/8
|