feat: 项目初始化 + 3D方块世界原型 + AI助搭系统
CI / Go Backend (push) Canceled after 0s

初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器

HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块

Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚

AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
This commit is contained in:
xyou
2026-08-08 14:07:56 +08:00
parent 9500c4c80a
commit f70b061d1a
1972 changed files with 159760 additions and 6 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Build (CI)
permissions:
contents: read
on:
push:
branches: [dev]
paths-ignore: &ignored
- '**/.editorconfig'
- '**/.gitignore'
- '**/.gitattributes'
- '**/*.md'
- '**/LICENSE'
- '**/LICENCE'
- 'PCL.Core.Test/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/FUNDING.yml'
pull_request:
paths-ignore: *ignored
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- configuration: CI
architecture: x64
- configuration: CI
architecture: ARM64
fail-fast: false
uses: ./.github/workflows/reusable-build.yml
with:
configuration: ${{ matrix.configuration }}
architecture: ${{ matrix.architecture }}
secrets: inherit
@@ -0,0 +1,22 @@
name: Mirror Chyan (Release Note)
permissions:
contents: read
on:
workflow_dispatch:
release:
types: [edited]
jobs:
mirrorchyan:
runs-on: macos-latest
steps:
- id: uploading
uses: MirrorChyan/release-note-action@v1
with:
mirrorchyan_rid: PCL2-CE
upload_token: ${{ secrets.MirrorChyanUploadToken }}
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,41 @@
name: Mirror Chyan (Upload)
permissions:
contents: read
on:
workflow_dispatch:
inputs:
channel:
required: true
default: 'stable'
type: choice
options:
- stable
- beta
arch:
required: true
default: 'x64'
type: choice
options:
- x64
- arm64
jobs:
mirrorchyan_uploading:
runs-on: macos-latest
steps:
- uses: MirrorChyan/uploading-action@v1
with:
filetype: latest-release
filename: "PCL2_CE_${{ inputs.channel == 'stable' && 'Release' || 'Beta' }}_${{ inputs.arch == 'x64' && 'x64' || 'ARM64' }}.exe"
mirrorchyan_rid: PCL2-CE
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: PCL-Community
repo: PCL2-CE
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: win
arch: ${{ inputs.arch }}
channel: ${{ inputs.channel }}
@@ -0,0 +1,102 @@
name: Publish (Beta)
permissions:
contents: read
on:
release:
types: [published]
jobs:
build:
if: ${{ github.event.release.prerelease }}
strategy:
matrix:
include:
- configuration: Beta
architecture: x64
- configuration: Beta
architecture: ARM64
fail-fast: false
uses: ./.github/workflows/reusable-build.yml
with:
configuration: ${{ matrix.configuration }}
architecture: ${{ matrix.architecture }}
secrets: inherit
changelog:
permissions:
contents: write
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ github.event.release.prerelease }}
steps:
- name: Checkout all
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install git-cliff
uses: taiki-e/install-action@git-cliff
- name: Generate changelog
run: git-cliff --latest -o CHANGELOG.md
- name: Add changelog to release
uses: softprops/action-gh-release@v2.5.0
with:
tag_name: ${{ github.event.release.tag_name }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rename_and_release:
permissions:
contents: write
actions: write
needs: [build, changelog]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- configuration: Beta
architecture: x64
- configuration: Beta
architecture: ARM64
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}
path: ./artifact
- name: Rename binaries
run: |
mv "./artifact/Plain Craft Launcher 2.exe" "PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Sign the binary
run: |
gpg --detach-sign --armor "PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe"
- name: Upload binary and signature to Release
uses: softprops/action-gh-release@v2.2.2
with:
files: |
PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe
PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe.asc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger MirrorChyanUploading
run: |
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_uploading.yml -f channel=beta -f arch=${{ matrix.architecture == 'x64' && 'x64' || 'arm64' }}
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,102 @@
name: Publish (Release)
permissions:
contents: read
on:
release:
types: [published]
jobs:
build:
if: ${{ !github.event.release.prerelease }}
strategy:
matrix:
include:
- configuration: Release
architecture: x64
- configuration: Release
architecture: ARM64
fail-fast: false
uses: ./.github/workflows/reusable-build.yml
with:
configuration: ${{ matrix.configuration }}
architecture: ${{ matrix.architecture }}
secrets: inherit
changelog:
permissions:
contents: write
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ !github.event.release.prerelease }}
steps:
- name: Checkout all
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install git-cliff
uses: taiki-e/install-action@git-cliff
- name: Generate changelog
run: git-cliff --latest -o CHANGELOG.md
- name: Add changelog to release
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ github.event.release.tag_name }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rename_and_release:
permissions:
contents: write
actions: write
needs: [build, changelog]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- configuration: Release
architecture: x64
- configuration: Release
architecture: ARM64
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}
path: ./artifact
- name: Rename binaries
run: |
mv "./artifact/Plain Craft Launcher 2.exe" "PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Sign the binary
run: |
gpg --detach-sign --armor "PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe"
- name: Upload binary and signature to Release
uses: softprops/action-gh-release@v2.5.0
with:
files: |
PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe
PCL2_CE_${{ matrix.configuration }}_${{ matrix.architecture }}.exe.asc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger MirrorChyanUploading
run: |
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_uploading.yml -f channel=stable -f arch=${{ matrix.architecture == 'x64' && 'x64' || 'arm64' }}
gh workflow run --repo $GITHUB_REPOSITORY mirrorchyan_release_note.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+57
View File
@@ -0,0 +1,57 @@
name: Build (Reusable)
permissions:
contents: read
on:
workflow_call:
inputs:
configuration:
required: true
type: string
architecture:
required: true
type: string
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set Describe
run: |
describe=`git describe --tags --always`
echo "describe=$describe" >> $GITHUB_ENV
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Build Project
env:
PCL_WRITE_SECRET: '1'
PCL_MS_CLIENT_ID: ${{ secrets.CLIENT_ID }}
PCL_CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
PCL_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
PCL_NAID_CLIENT_ID: ${{ secrets.NAID_CLIENT_ID }}
PCL_NAID_CLIENT_SECRET: ${{ secrets.NAID_CLIENT_SECRET }}
PCL_LINK_SERVER_ROOT: ${{ secrets.LINK_SERVER_ROOTS }}
PCL_LOBBY_DEFAULT_SECRET: ${{ secrets.LOBBY_DEFAULT_SECRET }}
PCL_GITHUB_SHA: ${{ github.sha }}
run: |
dotnet publish "Plain Craft Launcher 2/Plain Craft Launcher 2.csproj" \
-p:Configuration=${{ inputs.configuration }} -p:Platform=${{ inputs.architecture }} \
-p:DeleteExistingFiles=true -o ./artifact --no-self-contained
- name: Upload the Build Artifact
uses: actions/upload-artifact@v7
with:
name: PCL2_CE_${{ inputs.configuration }}_${{ inputs.architecture }}
path: artifact/**