Skip to content

Merge pull request #1 from SpaceAgeMP/renovate/configure #40

Merge pull request #1 from SpaceAgeMP/renovate/configure

Merge pull request #1 from SpaceAgeMP/renovate/configure #40

Workflow file for this run

name: Build
on: [push]
env:
MODULE_NAME: luaerror
DEPENDENCIES: ./dependencies
GARRYSMOD_COMMON: ./dependencies/garrysmod_common
GARRYSMOD_COMMON_BRANCH: x86-64-support-sourcesdk
GARRYSMOD_COMMON_REPOSITORY: https://github.com/danielga/garrysmod_common.git
PROJECT_GENERATOR_VERSION: 3
REPOSITORY_DIR: .
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
id: create_release
build_windows:
needs: [create_release]
runs-on: windows-latest
env:
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.ps1
BUILD_SCRIPT: ./dependencies/garrysmod_common/build/build.ps1
COMPILER_PLATFORM: vs2022
PROJECT_OS: windows
PREMAKE5: ./dependencies/windows/premake-core/premake5.exe
PREMAKE5_URL: https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-windows.zip
steps:
- uses: actions/checkout@v3
- name: Build
run: |
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString("$env:BOOTSTRAP_URL"))
& "$env:BUILD_SCRIPT"
- name: Upload release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
fail_on_unmatched_files: true
files: "**/Release/**/*.dll"
build_linux:
needs: [create_release]
runs-on: ubuntu-latest
env:
BOOTSTRAP_URL: https://raw.githubusercontent.com/danielga/garrysmod_common/master/build/bootstrap.sh
BUILD_SCRIPT: ./dependencies/garrysmod_common/build/build.sh
COMPILER_PLATFORM: gmake
PREMAKE5: ./dependencies/linux/premake-core/premake5
PROJECT_OS: linux
PREMAKE5_URL: https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz
steps:
- uses: actions/checkout@v3
- name: Build
run: |
set -ex
sudo apt-get -y install gcc-multilib g++-multilib
curl -f -s -L "$BOOTSTRAP_URL" | bash -x
$BUILD_SCRIPT
- name: Upload release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
fail_on_unmatched_files: true
files: "**/Release/**/*.dll"
build_macos:
needs: [create_release]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build
env:
AR: ar
run: |
set -ex
brew install premake make
rm -rf "${DEPENDENCIES}" && mkdir -p "${DEPENDENCIES}"
git clone --branch "${GARRYSMOD_COMMON_BRANCH}" --depth 1 "${GARRYSMOD_COMMON_REPOSITORY}" "${GARRYSMOD_COMMON}"
pushd "${GARRYSMOD_COMMON}" && git submodule update --init --recursive && popd
premake5 --os=macosx gmake
cd projects/macosx/gmake
gmake config=release_x86_64
- name: Upload release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
tag_name: ${{ needs.create_release.outputs.tag-name }}
fail_on_unmatched_files: true
files: "**/Release/**/*.dll"