Skip to content

update(src): Pings

update(src): Pings #7

Workflow file for this run

name: Compiler
on:
push:
branches:
- '**'
pull_request:
jobs:
versioning:
permissions:
contents: write
runs-on: ubuntu-latest
container:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Packages
shell: bash
run: |
sudo apt update
sudo apt install -y curl jq
- name: Generate version
uses: reecetech/version-increment@2024.4.4
id: version
with:
release_branch: main
increment: patch
use_api: true
build:
name: Build
needs: versioning
runs-on: ${{ matrix.os }}
env:
MMSOURCE20: ${{ github.workspace }}/${{ github.event.repository.name }}/alliedmodders/metamod
HL2SDKCS2: ${{ github.workspace }}/${{ github.event.repository.name }}/alliedmodders/hl2sdk
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
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: Setup Version
shell: bash
run: echo "VERSION=${{needs.versioning.outputs.version}}" >> $GITHUB_ENV
- name: Build - Linux
if: matrix.os == 'ubuntu-latest'
working-directory: ${{ github.event.repository.name }}
shell: bash
run: |
sudo apt update
sudo apt install -y libreadline-dev libboost-all-dev fdupes unzip
bash ./setup.sh
- name: Build - Windows
if: matrix.os == 'windows-latest'
working-directory: ${{ github.event.repository.name }}
run: |
./setup.ps1
- name: Upload Artifacts Linux
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: Extension.Linux
path: ${{ github.workspace }}/${{ github.event.repository.name }}/build/package
- name: Upload Artifacts Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: Extension.Windows
path: ${{ github.workspace }}/${{ github.event.repository.name }}/build/package
release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
permissions:
contents: write
needs: ["versioning", "build"]
runs-on: ubuntu-latest
container:
image: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
steps:
- uses: actions/download-artifact@v4
id: download-artifacts
with:
path: build
- name: Prepare ZIP Files
run: |
sudo apt install p7zip-full -y;
(cd build/Extension.Linux; 7z a -tzip ../../../Extension.Linux.zip *)
(cd build/Extension.Windows; 7z a -tzip ../../../Extension.Windows.zip *)
echo "PATH_ARTIFACTS=$(cd ..; pwd)" >> $GITHUB_ENV
- name: Release
id: release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.versioning.outputs.version }}
make_latest: "true"
files: |
${{env.PATH_ARTIFACTS}}/Extension.Linux.zip
${{env.PATH_ARTIFACTS}}/Extension.Windows.zip