Skip to content

Compile, Compress, and Attach to Release #21

Compile, Compress, and Attach to Release

Compile, Compress, and Attach to Release #21

# بسم الله الرحمن الرحيم
# la ilaha illa Allah Mohammed Rassoul Allah
name: Compile, Compress, and Attach to Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Compile Zig project
run: zig build -Dtarget=x86_64-windows --release=safe -Dembed-pictures=true
- name: Compress binary and DLL
run: zip -j quran-warsh_${{ steps.get_release.outputs.tag_name }}-embedded-pictures_win64.zip zig-out/bin/quran-warsh.exe zig-out/bin/quran-warsh.pdb libs/CSFML/bin/csfml-graphics-2.dll
- name: Upload compressed binary to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: quran-warsh_${{ steps.get_release.outputs.tag_name }}-embedded-pictures_win64.zip
asset_name: quran-warsh_${{ steps.get_release.outputs.tag_name }}-embedded-pictures_win64.zip
asset_content_type: application/zip