Added task II #12
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: 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/parallel | |
# Windows | |
mkdir -p staging/windows/non-parallel | |
mkdir -p staging/windows/parallel | |
- name: "[blst] Build Linux" | |
run: | | |
cargo rustc --manifest-path blst/Cargo.toml --release --target x86_64-unknown-linux-gnu --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 --crate-type=staticlib --features=parallel | |
mv target/x86_64-unknown-linux-gnu/release/librust_kzg_blst.a staging/linux/parallel/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 --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 --crate-type=staticlib --features=parallel | |
mv target/x86_64-pc-windows-gnu/release/librust_kzg_blst.a staging/windows/parallel/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 |