This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
Add damage print #51
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 at https://github.com/Source2ZE/CS2Fixes/blob/main/.github/workflows/build.yml | |
name: CI | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- main | |
paths-ignore: | |
- LICENSE | |
- README.md | |
- 'configs**' | |
- '**.sln' | |
- '**.vcxproj**' | |
pull_request: | |
paths-ignore: | |
- LICENSE | |
- README.md | |
- 'configs**' | |
- '**.sln' | |
- '**.vcxproj**' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
env: | |
HL2SDKCS2: ${{ github.workspace }}/mm-cs2-scrim/sdk | |
container: ${{ matrix.container }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
include: | |
- os: windows-latest | |
- os: ubuntu-latest | |
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: mm-cs2-scrim | |
submodules: recursive | |
- name: Checkout Metamod | |
uses: actions/checkout@v4 | |
with: | |
repository: alliedmodders/metamod-source | |
ref: master | |
path: mmsource-2.0 | |
submodules: recursive | |
- name: Checkout AMBuild | |
uses: actions/checkout@v4 | |
with: | |
repository: alliedmodders/ambuild | |
path: ambuild | |
- name: Install AMBuild | |
run: | | |
cd ambuild && python setup.py install && cd .. | |
- name: Build | |
working-directory: mm-cs2-scrim | |
shell: bash | |
run: | | |
mkdir build && cd build | |
python ../configure.py --enable-optimize --symbol-files --sdks cs2 | |
ambuild | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ runner.os }} | |
path: mm-cs2-scrim/build/package | |
release: | |
name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Package | |
run: | | |
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"` | |
ls -Rall | |
if [ -d "./Linux/" ]; then | |
cd ./Linux/ | |
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz * | |
cd - | |
fi | |
if [ -d "./Windows/" ]; then | |
cd ./Windows/ | |
zip -r ../${{ github.event.repository.name }}-${version}-windows.zip * | |
cd - | |
fi | |
- name: Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ github.event.repository.name }}-* | |
tag: ${{ github.ref }} | |
file_glob: true |