Skip to content

Fix IsInRender check #18

Fix IsInRender check

Fix IsInRender check #18

Workflow file for this run

name: Release Mod
on:
workflow_dispatch:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*' # Push events with tag
env:
module_id: ClockMod
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout
with:
submodules: true
lfs: true
- name: Get the tag name
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- uses: seanmiddleditch/gha-setup-ninja@v5
- name: Get QPM
uses: Fernthedev/qpm-action@v1
with:
resolve_ndk: true
#required
workflow_token: ${{secrets.GITHUB_TOKEN}}
restore: true # will run restore on download
cache: true #will cache dependencies
version: '${{ env.version }}'
#qpm_qmod: '${{ env.module_id }}_${{ env.qmodversion }}.qmod'
- name: QPM Collapse
run: |
qpm collapse
- name: Check dependency Folders
run: |
echo "Checking extern includes"
ls -lh ${GITHUB_WORKSPACE}/extern/includes
echo ""
echo "Checking libs"
ls -lh ${GITHUB_WORKSPACE}/extern/libs
echo ""
echo "Checking QPM/cache Folder"
ls -lh $HOME/.local/share/QPM-RS/cache
echo ""
- name: Get BSVersion & Update mod.template.json
shell: pwsh
run: |
$BSVersion = Get-Content ./extern/includes/bs-cordl/include/version.txt
echo "BSVersion=$($BSVersion)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$modTemplate = Get-Content ./mod.template.json -Raw | ConvertFrom-Json
$modTemplate.packageVersion = $BSVersion
$modTemplate | ConvertTo-Json | Out-File -FilePath ./mod.template.json -Encoding utf8
# - name: Temp Fix QPM extern.cmake issue
# shell: pwsh
# run: |
# $cmakeFilePath = "./extern.cmake"
# $externcmake = Get-Content $cmakeFilePath -Raw
# $partToRemove = 'add_library(${COMPILE_ID} SHARED ${EXTERN_DIR}/includes/bs-cordl/version.txt)'
# $externcmake -replace [regex]::Escape($partToRemove), '' | Set-Content $cmakeFilePath
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./build.ps1 -actions
cp ./build/debug/lib${{ env.module_id }}.so ./build/debug_lib${{ env.module_id }}.so
- name: Get Library Name
id: libname
run: |
cd ./build/
pattern="lib${module_id}*.so"
files=( $pattern )
echo "NAME=${files[0]}" >> $GITHUB_OUTPUT
- name: Package QMOD
run: |
cd ${GITHUB_WORKSPACE}
qpm qmod zip -i ./build/ -i ./extern/libs/ ${module_id}_${version}.qmod
- name: Release
uses: softprops/action-gh-release@v2
with:
name: ${{ env.module_id }} ${{ env.version }} for Beat Saber ${{ env.BSVersion }}
files: |
./${{ env.module_id }}_${{ env.version }}.qmod
./build/lib${{ env.module_id }}.so
./build/debug_lib${{ env.module_id }}.so
body_path: ./rl-notes.md
draft: true