main -> master #2
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
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up RPM environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y rpm | |
- name: Build RPM package | |
run: | | |
rpmbuild -bb *.spec | |
- name: Find RPM files | |
id: findrpm | |
run: | | |
echo "::set-output name=files::$(find . -type f -name "*.rpm" -o -name "*.src.rpm")" | |
- name: Create binary release | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.repository.releases_url }} | |
asset_path: ${{ steps.findrpm.outputs.files }} | |
asset_name: ${{ steps.findrpm.outputs.files }} | |
asset_content_type: application/x-rpm |