Skip to content

Rework linux release #38

Rework linux release

Rework linux release #38

Workflow file for this run

name: release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
name: Docker images for ghcr.io
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
arch: [linux/amd64, linux/arm64]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOCKER_REGISTRY: ghcr.io
DOCKER_IMAGE_BASE: ${{ github.repository }}
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up environment
run: |
echo "Setting up environment for ${{ matrix.arch }}"
if [ "${{ matrix.arch }}" == "linux/amd64" ]; then
echo "TARGET_ARCH=x86_64" >> $GITHUB_ENV
elif [ "${{ matrix.arch }}" == "linux/arm64" ]; then
echo "TARGET_ARCH=arm64" >> $GITHUB_ENV
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Prover and Verifier and deb
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Extract files and build DEB package
run: |
chmod +x ./build_deb.sh # Ensure your script is executable
./build_deb.sh ${{ steps.vars.outputs.tag }}
- name: Verify file existence#2
run: ls -la /tmp/stone-prover
- name: Rename binaries and deb
run: |
echo "Renaming binaries to include architecture"
mv /tmp/stone-prover/usr/bin/cpu_air_prover ./cpu_air_prover-linux-${TARGET_ARCH}
mv /tmp/stone-prover/usr/bin/cpu_air_verifier ./cpu_air_verifier-linux-${TARGET_ARCH}
mv /tmp/stone-prover/stone-prover.deb /tmp/stone-prover/stone-prover-linux-${TARGET_ARCH}.deb
- name: Upload files to a GitHub release
uses: softprops/action-gh-release@v2
with:
files: ./cpu_air*
- name: Upload dep to a GitHub release
id: create_release_deb
uses: softprops/action-gh-release@v2
with:
files: /tmp/stone-prover/stone-prover-linux-${TARGET_ARCH}.deb