Merge pull request #330 from ConcealNetwork/development #31
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: Ubuntu 20.04 | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build-ubuntu20: | |
name: Ubuntu 20.04 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Build | |
id: build | |
run: | | |
sudo fallocate -l 6G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo apt-get update | |
sudo apt-get install -y libboost-all-dev | |
build_folder="build/debug" | |
ccx_version=$(echo "$GITHUB_REF" | sed 's|refs/tags/||') | |
ccx_ver_folder=$(echo $ccx_version | sed 's/\.//g') | |
release_name=ccx-cli-ubuntu-2004-v"$ccx_version" | |
mkdir -p "$build_folder" | |
cd "$build_folder" | |
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DSTATIC=ON | |
make -j2 | |
mkdir -p "$release_name/$ccx_ver_folder" | |
exeFiles=() | |
for f in src/*; do [[ -x $f && -f $f ]] && exeFiles+=( "$f" ); done | |
cp "${exeFiles[@]}" "$release_name/$ccx_ver_folder" | |
cd "$release_name" | |
tar -czf "$release_name".tar.gz "$ccx_ver_folder" | |
sha256=$(shasum -a 256 "$release_name".tar.gz | awk '{print toupper($1)}') | |
asset_path="./$build_folder/$release_name/$release_name.tar.gz" | |
echo "sha256=${sha256}" >> $GITHUB_OUTPUT | |
echo "release_name=${release_name}.tar.gz" >> $GITHUB_OUTPUT | |
echo "asset_path=${asset_path}" >> $GITHUB_OUTPUT | |
echo "ccx_version=${ccx_version}" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/[email protected] | |
with: | |
files: ${{ steps.build.outputs.asset_path }} | |
name: Conceal Core CLI v${{ steps.build.outputs.ccx_version }} | |
body: | | |
[Download for Ubuntu 20.04](../../releases/download/${{ steps.build.outputs.ccx_version }}/${{ steps.build.outputs.release_name }}) **${{ steps.build.outputs.release_name }}** | |
`SHA256 : ${{ steps.build.outputs.sha256 }}` | |
append_body: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |