Files
LanMountainDesktop/.github/workflows/build.yml
lincube 3d22c04a04 0.2.8
天气组件、倒计时组件微调。引入浏览器组件。
2026-03-04 03:41:59 +08:00

117 lines
2.8 KiB
YAML

name: Build
on:
push:
pull_request:
workflow_dispatch:
env:
DOTNET_VERSION: '10.0.x'
Solution_Name: LanMontainDesktop.sln
jobs:
build-windows:
runs-on: windows-latest
name: Build_Windows_${{ matrix.configuration }}
strategy:
matrix:
configuration: [ Debug, Release ]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c ${{ matrix.configuration }} -v minimal
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-windows-${{ matrix.configuration }}
path: |
LanMontainDesktop/bin/${{ matrix.configuration }}/
LanMontainDesktop.RecommendationBackend/bin/${{ matrix.configuration }}/
retention-days: 7
build-linux:
runs-on: ubuntu-latest
name: Build_Linux
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libfontconfig1 libfreetype6 \
libx11-6 libxrandr2 libxinerama1 \
libxi6 libxcursor1 libxext6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release -v minimal
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-linux
path: |
LanMontainDesktop/bin/Release/
LanMontainDesktop.RecommendationBackend/bin/Release/
retention-days: 7
build-macos:
runs-on: macos-latest
name: Build_macOS
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release -v minimal
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build-macos
path: |
LanMontainDesktop/bin/Release/
LanMontainDesktop.RecommendationBackend/bin/Release/
retention-days: 7