Skip to content

Fixing build scripts. #12

Fixing build scripts.

Fixing build scripts. #12

Workflow file for this run

# .github/workflows/release.yml
name: MSX Tile Forge Build Orchestrator
on:
workflow_dispatch:
inputs:
build_type:
description: 'Type of build to run'
required: true
default: 'dev_build'
type: choice
options:
- dev_build
# Add other types like rc_build and nightly_build here when ready
jobs:
############################################################
# JOB 1: Calculate Version String
############################################################
prepare:
name: Calculate Version
runs-on: ubuntu-latest
outputs:
version_string: ${{ steps.versioning.outputs.VERSION_STRING }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Construct Dev Version String
id: versioning
if: github.event.inputs.build_type == 'dev_build'
run: |
BRANCH_NAME="${{ github.ref_name }}"
# Robustly find REL_... and TKT_... parts anywhere in the branch name
BASE_VERSION=$(echo "$BRANCH_NAME" | grep -oP 'REL_[0-9.]+' | sed 's/REL_//')
TICKET_NUM=$(echo "$BRANCH_NAME" | grep -oP 'TKT_[0-9]+' | sed 's/TKT_//')
BRANCH_BUILD_NUM=$(git rev-list --count HEAD)
GLOBAL_BUILD_NUM="${{ github.run_number }}"
FINAL_VERSION="v${BASE_VERSION}_dev${TICKET_NUM}.${BRANCH_BUILD_NUM}_${GLOBAL_BUILD_NUM}"
echo "VERSION_STRING=${FINAL_VERSION}" >> $GITHUB_OUTPUT
# Add more "Construct Version String" steps here for RC, Final, etc. in the future
###################################################################
# JOB 2: Call the build workflows to run in parallel
###################################################################
build_windows:
name: Build Windows Artifact
needs: prepare # This job waits for the version calculation to finish
uses: ./.github/workflows/build-windows.yml
with:
version_string: ${{ needs.prepare.outputs.version_string }}
artifact_name: windows-build-${{ needs.prepare.outputs.version_string }}
build_linux:
name: Build Linux & Debian Artifacts
needs: prepare
uses: ./.github/workflows/build-linux.yml
with:
version_string: ${{ needs.prepare.outputs.version_string }}
artifact_name_linux: linux-build-${{ needs.prepare.outputs.version_string }}
artifact_name_deb: debian-build-${{ needs.prepare.outputs.version_string }}```
This complete, three-file setup is the robust and correct implementation of your build system. Once you commit and push these changes, please try running the `dev_build` again. It should now succeed on all platforms.

Check failure on line 68 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 68