-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux release CI update: more apt pkgs
- Loading branch information
1 parent
bf15b16
commit 1b11fed
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: ZIG-9.1 Release Linux, Windows (beta) | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
draft_release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref_name }} ${{ github.sha }} | ||
body: | | ||
Automated Release by GitHub Action CI | ||
All builds are release-fast builds | ||
draft: false | ||
prerelease: true | ||
|
||
build-ubuntu: | ||
needs: draft_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: goto-bus-stop/setup-zig@v1 | ||
with: | ||
version: 0.9.1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Update Ubuntu | ||
run: | | ||
lsb_release -a | ||
sudo apt-get update | ||
sudo apt-get install -y libglew-dev libsdl2-dev libpng-dev xorg-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libglfw3-dev libglm-dev | ||
- name: Build executable | ||
run: zig build -Drelease-fast -Dtarget=x86_64-linux-gnu --verbose | ||
|
||
- name: Copy data files | ||
run: cp -pr *.sld assets ./zig-out/bin/ | ||
|
||
- name: Delete unnecessary files | ||
run: rm -fr ./zig-out/bin/assets/pptx | ||
|
||
- name: Zip it | ||
run: tar -C ./zig-out/bin -cvzf slides.tar.gz . | ||
|
||
- name: Ship it (Linux x64) | ||
id: upload-release-asset-linux-x64 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.draft_release.outputs.upload_url }} | ||
asset_path: ./slides.tar.gz | ||
asset_name: slides-linux-release-${{ github.ref_name }}.tar.gz | ||
asset_content_type: application/gzip | ||
|