Add Github Action to build RPM (#14)

* Update SPEC file

* Add clean target to Makefile

* add rpmbuild action

* Add missing build dependency

* Fix package name of golang for CentOS8

* Change outputs

* Fix file list and build requires

* Fix for file list

* Also upload SRPM
This commit is contained in:
Thomas Gruber
2021-11-29 16:04:50 +01:00
committed by GitHub
parent 28163f5d2e
commit 15cf16b46f
3 changed files with 41 additions and 8 deletions

23
.github/workflows/rpmbuild.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Run RPM Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: TomTheBear/rpmbuild@master
id: rpm
name: Build RPM package on CentOS8
with:
spec_file: "./scripts/cc-metric-collector.spec"
- name: Save RPM as artifact
uses: actions/upload-artifact@v1.0.0
with:
name: cc-metric-collector RPM CentOS8
path: ${{ steps.rpm.outputs.rpm_dir_path }}
- name: Save SRPM as artifact
uses: actions/upload-artifact@v1.0.0
with:
name: cc-metric-collector SRPM CentOS8
path: ${{ steps.rpm.outputs.source_rpm_path }}