OneLauncher-Cracked/.github/actions/setup-packages/action.yml
2024-10-18 20:26:43 +02:00

59 lines
1.6 KiB
YAML

name: Setup System and Rust
description: Setup System and Rust
inputs:
token:
description: GitHub token
required: false
default: ''
setup-arg:
description: Argument for the system setup script
required: false
default: ''
runs:
using: composite
steps:
- name: (macOS) Install bash@latest
shell: bash
if: ${{ runner.os == 'macOS' }}
run: brew install bash
- name: (Linux) Install mold@latest
shell: bash
if: ${{ runner.os == 'Linux' }}
run: |
curl -L# 'https://github.com/rui314/mold/releases/download/v2.33.0/mold-2.33.0-x86_64-linux.tar.gz' \
| sudo tar -xzf- -C /usr/local
- name: (Linux) Cleanup Runner
shell: bash
if: ${{ runner.os == 'Linux' }}
run: |
set -eux
if dpkg -l | grep i386; then
sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386" || true
sudo dpkg --remove-architecture i386 || true
fi
sudo apt-get remove libunwind-* || true
- name: (Linux/macOS) - Setup System
shell: bash
if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }}
run: ./packages/scripts/setup.sh ${{ inputs.setup-arg }}
- name: (Windows) - Setup System
if: ${{ runner.os == 'Windows' }}
shell: powershell
run: ./packages/scripts/setup.ps1
- name: Setup pnpm
uses: ./.github/actions/setup-pnpm
with:
token: ${{ github.token }}
- name: Setup Shared Libraries
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
NODE_ENV: debug
run: pnpm prep