Skip to content

Workflow file for this run

name: Release Stone Prover for Fedora
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
container:
image: fedora:34
options: --workdir /github/workspace
env:
TARGET_ARCH: x86_64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up environment and build
run: |
chmod +x ./fedora-build.sh
./fedora-build.sh
- name: Test
run: |
chmod +x ./test.sh
./test.sh
- name: Set version output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Package RPM
run: |
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cp stone-prover.spec ~/rpmbuild/SPECS/
cp /usr/local/bin/cpu_air_prover ~/rpmbuild/SOURCES/cpu_air_prover-${TARGET_ARCH}
cp /usr/local/bin/cpu_air_verifier ~/rpmbuild/SOURCES/cpu_air_verifier-${TARGET_ARCH}
rpmbuild -ba ~/rpmbuild/SPECS/stone-prover.spec \
--define "version ${{ steps.vars.outputs.tag }}" \
--define "_topdir $HOME/rpmbuild"
- name: Rename RPM package
run: |
mv ~/rpmbuild/RPMS/x86_64/*.rpm ./stone-prover-fedora-${TARGET_ARCH}.rpm
- name: Upload files to GitHub release
uses: softprops/action-gh-release@v2
with:
files: |
/usr/local/bin/cpu_air_prover
/usr/local/bin/cpu_air_verifier
./stone-prover-fedora-${TARGET_ARCH}.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}