Create main.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |