🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> corregida la ubicació de project.h canvis en create-release de release.yml CORREGIT UN PUTO ESPAI EN RELEASE.YML sadjasbndk fiuwhfiusdh sgdwehgr eriojgtoie
122 lines
4.0 KiB
YAML
122 lines
4.0 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
# ============================================================================
|
|
# BUILD LINUX (Nativo)
|
|
# ============================================================================
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
container: ubuntu:latest
|
|
steps:
|
|
- name: Instalar dependencias
|
|
run: |
|
|
apt-get update && apt-get install -y \
|
|
curl gnupg build-essential cmake git pkg-config \
|
|
libgl1-mesa-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
|
|
libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev \
|
|
libasound2-dev libpulse-dev libudev-dev libwayland-dev libxkbcommon-dev \
|
|
libxtst-dev libdbus-1-dev libdrm-dev libgbm-dev \
|
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
&& apt-get install -y nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup SDL3
|
|
run: |
|
|
git clone https://github.com/libsdl-org/SDL.git /tmp/SDL3 \
|
|
&& cd /tmp/SDL3 \
|
|
&& mkdir build && cd build \
|
|
&& cmake .. -DCMAKE_BUILD_TYPE=Release \
|
|
&& make -j$(nproc) \
|
|
&& make install \
|
|
&& rm -rf /tmp/SDL3
|
|
|
|
- name: Compilar
|
|
run: |
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
|
|
make linux_release
|
|
|
|
- name: Subir artefacto
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: linux-build
|
|
path: ./*-linux.tar.gz
|
|
|
|
# ============================================================================
|
|
# BUILD WINDOWS (Cross-Compile usando el nuevo target del Makefile)
|
|
# ============================================================================
|
|
build-windows:
|
|
runs-on: ubuntu-latest
|
|
container: ubuntu:latest
|
|
steps:
|
|
- name: Instalar dependencias
|
|
run: |
|
|
apt-get update && apt-get install -y \
|
|
curl build-essential cmake git pkg-config wget zip \
|
|
mingw-w64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 \
|
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
&& apt-get install -y nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup SDL3 (MinGW)
|
|
run: |
|
|
git clone https://github.com/libsdl-org/SDL.git /tmp/SDL3 \
|
|
&& cd /tmp/SDL3 \
|
|
&& mkdir build-mingw && cd build-mingw \
|
|
&& cmake .. \
|
|
-DCMAKE_SYSTEM_NAME=Windows \
|
|
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
|
|
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
|
|
-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32 \
|
|
&& make -j$(nproc) \
|
|
&& make install \
|
|
&& rm -rf /tmp/SDL3
|
|
|
|
- name: Compilar
|
|
run: make windows_cross SDL_DLL_PATH=/usr/x86_64-w64-mingw32/bin/SDL3.dll
|
|
|
|
- name: Subir artefacto
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-build
|
|
path: ./*-win32-x64.zip
|
|
|
|
# ============================================================================
|
|
# RELEASE
|
|
# ============================================================================
|
|
create-release:
|
|
needs: [build-linux, build-windows]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
path: artifacts
|
|
merge-multiple: true
|
|
|
|
- name: setup go
|
|
uses: https://github.com/actions/setup-go@v4
|
|
with:
|
|
go-version: '>=1.20.1'
|
|
|
|
- name: Crear Release en Gitea
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
files: artifacts/*
|
|
api_key: ${{ secrets.RELEASE_TOKEN }}
|
|
tag: ${{ github.ref_name }}
|
|
generate_release_notes: true
|
|
|
|
|