Fix spec file path 2 #7
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: Set up RPM environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y rpm | |
mkdir -p ~/rpmbuild/SOURCES | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
path: ~/rpmbuild/SOURCES | |
- name: Build RPM package | |
run: | | |
rpmbuild -bb ${{ github.workspace }}/*.spec | |
- name: Find RPM files | |
id: findrpm | |
run: | | |
echo "::set-output name=files::$(find ~/rpmbuild/RPMS/ -type f -name "*.rpm")" | |
- name: Find SRPM files | |
id: findsrpm | |
run: | | |
echo "::set-output name=files::$(find ~/rpmbuild/SRPMS/ -type f -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 | |
- name: Create source release | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.repository.releases_url }} | |
asset_path: ${{ steps.findsrpm.outputs.files }} | |
asset_name: ${{ steps.findsrpm.outputs.files }} | |
asset_content_type: application/x-rpm |