TRX/.github/workflows/job_build_tr2.yml
2025-04-22 12:37:43 +02:00

48 lines
1.2 KiB
YAML

name: Build TR2X and the installer
on:
workflow_call:
inputs:
platform:
type: string
description: "Platform to build for"
required: true
target:
type: string
description: "Target to build for"
required: true
jobs:
build:
name: Build release assets
runs-on: ubuntu-latest
steps:
- name: Install dependencies
uses: taiki-e/install-action@just
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'true'
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- id: vars
name: Prepare variables
run: echo "version=$(just output-current-version 2)" >> $GITHUB_OUTPUT
- name: Download large assets
if: ${{ inputs.target == 'release' }}
run: just download-assets 2
- name: Package asset (${{ inputs.platform }})
run: just tr2-package-${{ inputs.platform }} ${{ inputs.target }}
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: TR2X-${{ steps.vars.outputs.version }}-${{ inputs.platform }}
path: |
*.zip
*.exe