Skip to content

Add cod4x assets

Add cod4x assets #36

Workflow file for this run

name: build
on:
push:
tags:
- '*'
pull_request:
branches:
- master
- develop
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install prerequisites
run: |
sudo apt-get install cmake g++-mingw-w64-i686-posix mingw-w64-i686-dev
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install nasm:i386
- name: CMake Configure
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.CLIENT_AUTH_DEPLOY_KEY }}'
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ -DOFFICIAL_BUILD=ON
- name: Build
run: |
cmake --build build --parallel
ln -s build/bin/cod4x_*.dll .
ln -s assets/cod4x/main/ .
ln -s assets/cod4x/zone/ .
sha1sum cod4x_*.dll main/*.iwd zone/*.ff > hashes.txt
- name: Publish release
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: ${{ github.ref_name }}
artifacts: "build/bin/cod4x_*.dll,assets/cod4x/main/*.iwd,assets/cod4x/zone/*.ff,hashes.txt"
token: ${{ secrets.GITHUB_TOKEN }}