summaryrefslogtreecommitdiffstats
path: root/.github/workflows/rpmbuild.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
commit62e4c68907d8d33709c2c1f92a161dff00b3d5f2 (patch)
treeadbbaf3acf88ea08f6eeec4b75ee98ad3b07fbdc /.github/workflows/rpmbuild.yml
parentInitial commit. (diff)
downloadlnav-28bf0ff1a7ad38ac9ddb1f5864ba0161b0617471.tar.xz
lnav-28bf0ff1a7ad38ac9ddb1f5864ba0161b0617471.zip
Adding upstream version 0.11.2.upstream/0.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/rpmbuild.yml')
-rw-r--r--.github/workflows/rpmbuild.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/rpmbuild.yml b/.github/workflows/rpmbuild.yml
new file mode 100644
index 0000000..67e6d83
--- /dev/null
+++ b/.github/workflows/rpmbuild.yml
@@ -0,0 +1,49 @@
+
+name: RPM Build
+
+on:
+ push:
+ branches: [ master ]
+ paths-ignore:
+ - docs
+ - README.md
+ - NEWS.md
+ tags:
+ - '*'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - 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 }}"
+ make -C release lnav.spec
+ - name: build RPM package
+ id: rpm
+ uses: tstack/rpmbuild@master
+ 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 }}
+
+ - name: Push to packagecloud.io
+ uses: tstack/upload-packagecloud@main
+ if: github.ref_type == 'tag'
+ with:
+ userrepo: tstack/lnav
+ apitoken: ${{ secrets.PACKAGECLOUD_TOKEN }}
+ packages: ${{ steps.rpm.outputs.rpm_dir_path }}x86_64
+ rpmdists: el/8