Skip to content

Fix release workflow #30

Fix release workflow

Fix release workflow #30

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: QuestSounds
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout
with:
submodules: true
lfs: true
- uses: seanmiddleditch/gha-setup-ninja@v5
- name: Get the tag name
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Get BSVersion
shell: pwsh
run: |
echo "BSVersion=$((Get-Content ./mod.template.json -Raw | ConvertFrom-Json).packageVersion)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Create ndkpath.txt
run: |
echo "$ANDROID_NDK_LATEST_HOME" > ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get QPM
if: steps.cache-qpm.outputs.cache-hit != 'true'
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: cargo-build.yml
name: linux-qpm
path: QPM
repo: QuestPackageManager/QPM.CLI
- name: QPM Collapse
run: |
chmod +x ./QPM/qpm
./QPM/qpm collapse
- name: QPM Dependencies Cache
id: cache-qpm-deps
uses: actions/cache@v2
env:
cache-name: cache-qpm-deps
with:
path: /home/runner/.local/share/QPM-RS/cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('qpm.shared.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-name }}
- name: QPM Set Version & Restore
run: |
./QPM/qpm package edit --version ${{ env.version }}
./QPM/qpm restore
- 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-Rust/cache Folder"
ls -lh $HOME/.local/share/QPM-RS/cache
echo ""
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./build.ps1 -actions
- 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/qpm qmod zip -i ./build/ -i ./extern/libs/ -f ./Cover.jpg -i ./Examples/ ${module_id}_${version}.qmod
- name: Release
uses: softprops/action-gh-release@v1
with:
name: ${{ env.module_id }} ${{ env.version }} for Beat Saber ${{ env.BSVersion }}
files: |
./${{ env.module_id }}_${{ env.version }}.qmod
body_path: ./rl-notes.md
draft: true