Skip to content

Create LICENSE

Create LICENSE #9

Workflow file for this run

name: Multi-Platform Build & Release
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
workflow_dispatch:
permissions:
contents: write
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B build -G "Visual Studio 17 2022" -A x64
- name: Build
run: cmake --build build --config Release
- name: Rename Executable
shell: pwsh
run: |
# 元のパスから指定の名前に変更
Move-Item "build/Release/SkinGetBE.exe" "build/Release/SkinGetBE.exe"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: win-x64
path: build/Release/SkinGetBE.exe
build-linux-x64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential cmake
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build
- name: Rename Binary
run: mv build/SkinGetBE build/SkinGetBE_amd64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-x64
path: build/SkinGetBE_amd64
build-linux-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Cross-Compiler
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu cmake
- name: Create Toolchain File
run: |
cat <<EOF > arm64-toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
EOF
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=arm64-toolchain.cmake
- name: Build
run: cmake --build build
- name: Rename Binary
run: mv build/SkinGetBE build/SkinGetBE_arm64
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: linux-arm64
path: build/SkinGetBE_arm64
create-release:
needs: [build-windows, build-linux-x64, build-linux-arm64]
runs-on: ubuntu-latest
# Push時、または手動実行時のみリリースを作成
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release_assets
merge-multiple: true
- name: Create Release (Draft)
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ github.run_number }}
name: Release v${{ github.run_number }}
draft: true
files: |
release_assets/SkinGetBE.exe
release_assets/SkinGetBE_amd64
release_assets/SkinGetBE_arm64