Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Build RPM Package
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up RPM build environment
run: |
sudo apt-get update
sudo apt-get install -y rpm build-essential
- name: Install dependencies
run: |
sudo apt-get install -y tuxedo-backlight-control
- name: Build RPM package
run: |
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp tuxedo-backlight-control.spec ~/rpmbuild/SPECS/
rpmbuild -ba ~/rpmbuild/SPECS/tuxedo-backlight-control.spec
- name: Upload RPM package
uses: actions/upload-artifact@v2
with:
name: tuxedo-backlight-control
path: ~/rpmbuild/RPMS/x86_64/*.rpm