Update build.yml #178
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
name: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
SOLUTION_FILE_PATH: metamod/asexthook | |
BUILD_CONFIGURATION: Release | |
permissions: | |
contents: write | |
jobs: | |
build-win32: | |
runs-on: windows-latest | |
steps: | |
- name: Git Clone Metamod | |
uses: sudosubin/git-clone-action@v1.0.1 | |
with: | |
repository: hzqst/metamod-fallguys | |
path: metamod | |
- name: Git Clone This | |
uses: sudosubin/git-clone-action@v1.0.1 | |
with: | |
repository: DrAbcOfficial/asexthook | |
path: metamod/asexthook | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: asexthook.dll | |
path: metamod/build/addons/metamod/dlls/asexthook.dll | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Build Enviroment | |
uses: ConorMacBride/install-package@v1 | |
with: | |
apt: make build-essential gcc gcc-multilib g++-multilib | |
- name: Git Clone Metamod | |
uses: sudosubin/git-clone-action@v1.0.1 | |
with: | |
repository: hzqst/metamod-fallguys | |
path: metamod | |
- name: Git Clone This | |
uses: sudosubin/git-clone-action@v1.0.1 | |
with: | |
repository: DrAbcOfficial/asexthook | |
path: metamod/asexthook | |
- name: Build | |
working-directory: ${{env.SOLUTION_FILE_PATH}} | |
run: mkdir build && cd build && cmake .. && make | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: asexthook.so | |
path: ${{env.SOLUTION_FILE_PATH}}/Release/libasexthook.so |