Skip to content

automatic release

automatic release #8

Workflow file for this run

name: automatic release
on:
push:
branches:
- main
workflow_dispatch:
env:
C_KZG_4844_GIT_HASH: '5703f6f3536b7692616bc289ac3f3867ab8db9d8'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install packages
run: |
sudo apt install -y mingw-w64
- name: "[blst] Prepare artifact folders"
run: |
# Linux
mkdir -p staging/linux/non-parallel
mkdir -p staging/linux/non-parallel-force-adx
mkdir -p staging/linux/parallel
mkdir -p staging/linux/parallel-force-adx
# Windows
mkdir -p staging/windows/non-parallel
mkdir -p staging/windows/non-parallel-force-adx
mkdir -p staging/windows/parallel
mkdir -p staging/windows/parallel-force-adx
- name: "[blst] Build Linux"
run: |
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 --crate-type=staticlib
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/non-parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/non-parallel-force-adx/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 --crate-type=staticlib --features=parallel
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib --features=parallel
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/parallel-force-adx/rust_kzg_blst.a
- name: "[blst] Compress Linux artifacts"
run: |
cp LICENSE staging/linux/
cp blst/*.patch staging/linux/
cd staging/linux/
zip -rz rust-kzg-blst-linux.zip * <<< "Compatible with c-kzg-4844 git hash: $C_KZG_4844_GIT_HASH."
- name: "[blst] Build Windows"
run: |
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 --crate-type=staticlib
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/non-parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/non-parallel-force-adx/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 --crate-type=staticlib --features=parallel
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/parallel/rust_kzg_blst.a
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-pc-windows-gnu -C target-cpu=x86-64 -C target-feature=+adx --crate-type=staticlib --features=parallel
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/parallel-force-adx/rust_kzg_blst.a
- name: "[blst] Compress Windows artifacts"
run: |
cp LICENSE staging/windows/
cp blst/*.patch staging/windows/
cd staging/windows/
zip -rz rust-kzg-blst-windows.zip * <<< "Compatible with c-kzg-4844 git hash: $C_KZG_4844_GIT_HASH."
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Automatic Release"
files: |
staging/linux/rust-kzg-blst-linux.zip
staging/windows/rust-kzg-blst-windows.zip