feat: 解锁歌曲全难度 #87
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| check: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly-2026-07-31 | |
| targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc | |
| components: clippy,rustfmt | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| - name: Schema tests | |
| run: cargo test -p applechu-schema --target x86_64-pc-windows-msvc | |
| - name: Check game-side proxy | |
| run: cargo check -p applechu --tests --target i686-pc-windows-msvc | |
| - name: Check AM Daemon proxy | |
| run: cargo check -p applechu-amdaemon --target x86_64-pc-windows-msvc | |
| - name: Clippy game-side proxy | |
| run: cargo clippy -p applechu --all-targets --target i686-pc-windows-msvc -- -D warnings | |
| - name: Clippy AM Daemon proxy | |
| run: cargo clippy -p applechu-amdaemon --target x86_64-pc-windows-msvc -- -D warnings | |
| build: | |
| runs-on: windows-latest | |
| needs: check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly-2026-07-31 | |
| targets: i686-pc-windows-msvc,x86_64-pc-windows-msvc | |
| - name: Build AppleChu | |
| shell: pwsh | |
| run: ./build.ps1 | |
| - name: Prepare AppleChu.zip | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path target/AppleChu-artifact | |
| Copy-Item target/winhttp.dll target/AppleChu-artifact/ | |
| Copy-Item target/winmm.dll target/AppleChu-artifact/ | |
| Copy-Item target/AppleChu.example.toml target/AppleChu-artifact/ | |
| Copy-Item target/AppleChu.full.toml target/AppleChu-artifact/ | |
| - name: Upload AppleChu.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: AppleChu | |
| path: target/AppleChu-artifact/* | |
| if-no-files-found: error | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: AppleChu | |
| path: AppleChu | |
| - name: Package release | |
| shell: pwsh | |
| run: Compress-Archive -Path AppleChu/* -DestinationPath AppleChu.zip | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: AppleChu.zip |