Added build artifact uploads to the github actions CI and removed duplicate READMEs (#300)

This commit is contained in:
Alexandros Naskos
2021-04-05 06:58:52 -07:00
committed by GitHub
parent 902c91e98f
commit 6a5664e018
3 changed files with 306 additions and 558 deletions

View File

@@ -32,3 +32,29 @@ jobs:
- name: Run Tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: zig build test
- name: Build artifacts
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
declare -a targets=("x86_64-windows" "x86_64-linux" "x86_64-macos" "i386-windows" "i386-linux")
mkdir -p "artifacts/"
for target in "${targets[@]}"; do
mkdir -p artifacts/$target
echo "Building target ${target}..."
zig build -Dtarget=${target} -Drelease-safe --cache-dir artifacts/${target}/
sed -e '1,5d' < README.md > artifacts/${target}/README.md
cp LICENSE.md artifacts/${target}/
cd artifacts/${target}/
tar cfJ ${target}.tar.xz *.md bin/*
mv ${target}.tar.xz ../
cd ../..
done
- name: Upload artifacts
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v2
with:
name: builds
path: artifacts/*.tar.xz