Skip to content

Update README.md

Update README.md #14

# This workflow does the following:
# 1) Compile everything (client and dedicated server)
# 2) Compress the binaries (because compression is cool)
# 3) Upload everything in a new release
#
# By default the binaries generated by this workflow are compiled using iphys and RocketUI (client) by default
# 02/2022 update: Now it should bump tag version so GitHub doesn't panic about it on every push
name: CI-Workflow
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Preparing environment...
env:
DEBIAN_FRONTEND: "noninteractive"
run: sudo apt update && sudo apt upgrade -y && sudo apt install -y git build-essential cmake libsdl2-mixer-dev libsdl2-dev libopenal-dev libcurlpp-dev libssl-dev libfontconfig1-dev libcurl4-openssl-dev net-tools wget unzip zip
- name: Building client...
run: cd cmake-build && cmake .. -DUSE_ROCKETUI=1 -DUSE_IPHYS_PHYSICS=1 && make -j$(nproc --all) && cd ${{ env.GITHUB_WORKSPACE }}
- name: Preparing additional files...
run: git clone https://github.com/P0L3NARUBA/Linux-Strike-Files && cp -r Linux-Strike-Files/* ../game
- name: Compressing assets...
run: cd .. && zip -9 -r game_client-x64-rocketui.zip game && rm -rf game && cd ${{ env.GITHUB_WORKSPACE }}
- name: Building dedicated...
run: cd cmake-build && cmake .. -DDEDICATED=1 && make -j$(nproc --all) && cd ${{ env.GITHUB_WORKSPACE }}
- name: Compressing assets...
run: cd .. && zip -9 -r game_dedicated-x64.zip game && rm -rf game && cd ${{ env.GITHUB_WORKSPACE }}
- name: Create tag version
if: github.event_name != 'pull_request'
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create release
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: true
release_name: AutoRelease ${{ steps.tag_version.outputs.new_tag }}
tag_name: ${{ steps.tag_version.outputs.new_tag }}
- name: Publish game client artifact
if: github.event_name != 'pull_request'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ../game_client-x64-rocketui.zip
asset_name: game_client-x64-rocketui.zip
asset_content_type: application/zip
- name: Publish game dedicated artifact
if: github.event_name != 'pull_request'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ../game_dedicated-x64.zip
asset_name: game_dedicated-x64.zip
asset_content_type: application/zip