Skip to content

Add additional handling of symbolic links #18

Add additional handling of symbolic links

Add additional handling of symbolic links #18

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019]
include:
- os: ubuntu-20.04
target-archs: x86,x86_64
- os: windows-2019
target-archs: x86,x86_64
env:
SOURCEMOD_VERSION: '1.11'
steps:
- uses: actions/setup-python@v5
name: Setup Python
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install Linux packages
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -yq --no-install-recommends g++-multilib
- uses: actions/checkout@v4
name: Repository checkout
with:
fetch-depth: 0
path: extension
- uses: actions/checkout@v4
name: Checkout SourceMod
with:
repository: alliedmodders/sourcemod
ref: ${{ env.SOURCEMOD_VERSION }}-dev
submodules: recursive
path: sourcemod
- uses: actions/checkout@v4
name: Checkout AMBuild
with:
repository: alliedmodders/ambuild
path: ambuild
- name: Setup AMBuild
shell: bash
run: |
pip install ./ambuild
- name: Build
working-directory: extension
run: |
mkdir build
cd build
python ../configure.py --enable-auto-versioning --enable-optimize --targets=${{ matrix.target-archs }}
ambuild
- name: Upload artifact
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' && (startsWith(matrix.os, 'ubuntu-20.04') || startsWith(matrix.os, 'windows-2019'))
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: extension/build/package
- name: Upload artifact
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main' && strategy.job-index == 0
uses: actions/upload-artifact@v4
with:
name: versioning
path: extension/build/includes
release:
name: Release
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main'
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Set release version
run: |
RELEASE="$(cat ./versioning/git_action_release)"
echo "GITHUB_RELEASE_TAG=$RELEASE" >> $GITHUB_ENV
- name: Package
run: |
mkdir -p dist
7z a dist/sm-filewatcher-${{ env.GITHUB_RELEASE_TAG }}-linux.tar.gz ./Linux/*
7z a dist/sm-filewatcher-${{ env.GITHUB_RELEASE_TAG }}-windows.zip ./Windows/*
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.GITHUB_RELEASE_TAG }}
file: 'dist/*'
file_glob: true
body: |
${{ github.event.head_commit.message }}