Skip to content

Merge pull request #50 from ReDevCafe/dev #32

Merge pull request #50 from ReDevCafe/dev

Merge pull request #50 from ReDevCafe/dev #32

Workflow file for this run

name: "Build and deploy project"
on:
push:
branches: [ "master" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v4
with:
path: C:\Program Files\LLVM
key: llvm-21.1.0-windows
- name: Install LLVM 21.1.0
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: choco install llvm --version=21.1.0 -y
shell: powershell
- name: Add LLVM to PATH
run: echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: powershell
- name: Pull submodule
run: git submodule update --init
- name: Configure CMake with Clang-CL
run: cmake -B ${{github.workspace}}/build -G "Ninja" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMLDEBUG=OFF
- name: Build project
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: fli-modloader
path: |
./build/ModLoader.dll
./build/ModLoader.lib
./build/DllProxy/version.dll
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Set up date-based tag
run: |
DATE_TAG="v$(date +'%Y%m%d.%H%M')"
echo "TAG_NAME=$DATE_TAG" >> $GITHUB_ENV
echo "tag=$DATE_TAG"
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG_NAME }}
body: "Automated release of ${{ github.ref_name }}."
generate_release_notes: true
token: ${{ secrets.RELEASE_CD_TOKEN }}
files: |
./fli-modloader/ModLoader.dll
./fli-modloader/ModLoader.lib
./fli-modloader/DllProxy/version.dll