Fix again Fedora dependencies and update build.sh #12
Workflow file for this run
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: Release Fedora Package | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # Trigger the workflow when a new tag is pushed (e.g., v1.0.0) | |
jobs: | |
build: | |
runs-on: ubuntu-latest # Using Ubuntu, but we'll simulate Fedora with Docker | |
steps: | |
- name: Checkout stone-prover repository | |
uses: actions/checkout@v2 | |
- name: Set up Fedora environment with Docker | |
run: | | |
docker pull fedora:latest # Pull the latest Fedora image | |
docker run --name fedora-build -d fedora:latest tail -f /dev/null # Start the Fedora container | |
- name: Install dependencies inside Fedora container | |
run: | | |
docker exec -i fedora-build bash -c "dnf update -y && dnf install -y rpm-build gcc make python3-pip" | |
- name: Copy and run build.sh inside Fedora container | |
run: | | |
docker cp ./build.sh fedora-build:/build.sh # Copy build.sh to Fedora container | |
docker exec -i fedora-build bash -c "chmod +x /build.sh && /build.sh" # Run build.sh inside container | |
- name: Package RPM inside Fedora container | |
run: | | |
docker exec -i fedora-build bash -c "mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}" | |
docker exec -i fedora-build bash -c "cp ./stone-prover.spec ~/rpmbuild/SPECS/stone-prover.spec" | |
docker exec -i fedora-build bash -c "rpmbuild -ba ~/rpmbuild/SPECS/stone-prover.spec --define '_topdir $HOME/rpmbuild'" | |
- name: Verify RPM creation | |
run: docker exec -i fedora-build bash -c "ls -la ~/rpmbuild/RPMS/x86_64/" | |
- name: Upload RPM to GitHub release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: ~/rpmbuild/RPMS/x86_64/*.rpm # Upload the RPM package to the release |