fix: Dotnet 9 json warning #31
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: Commit CI | |
| on: [push] | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "9.0.x" | |
| - name: Publish Windows and Linux | |
| run: | | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r linux-x64 --output ./publish/linux-x64 ./src/ImeWlConverterCmd | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r linux-arm64 --output ./publish/linux-arm64 ./src/ImeWlConverterCmd | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r win-x86 --output ./publish/win-x86 ./src/ImeWlConverterCmd | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r win-x86 --output ./publish/win-x86 "./src/IME WL Converter Win" | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r win-x64 --output ./publish/win-x64 ./src/ImeWlConverterCmd | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r win-x64 --output ./publish/win-x64 "./src/IME WL Converter Win" | |
| - name: Upload Windows and Linux Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: imewlconverter-windows-linux | |
| path: ./publish | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "9.0.x" | |
| - name: Publish macOS Command Line | |
| run: | | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r osx-x64 --output ./publish/osx-x64 ./src/ImeWlConverterCmd | |
| dotnet publish --configuration Release -p:PublishSingleFile=true --self-contained false -r osx-arm64 --output ./publish/osx-arm64 ./src/ImeWlConverterCmd | |
| - name: Publish macOS GUI App | |
| run: | | |
| dotnet publish ./src/ImeWlConverterMac --configuration Release --self-contained true --runtime osx-arm64 --output ./publish/mac-app-arm64 | |
| dotnet publish ./src/ImeWlConverterMac --configuration Release --self-contained true --runtime osx-x64 --output ./publish/mac-app-x64 | |
| - name: Create macOS .app Bundles | |
| run: | | |
| chmod +x ./scripts/create-app-bundle.sh | |
| ./scripts/create-app-bundle.sh ./publish/mac-app-arm64 "IME WL Converter ARM64" | |
| ./scripts/create-app-bundle.sh ./publish/mac-app-x64 "IME WL Converter x64" | |
| # 将 .app 包移动到 publish 目录 | |
| mv "IME WL Converter ARM64.app" ./publish/ | |
| mv "IME WL Converter x64.app" ./publish/ | |
| - name: Upload macOS Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: imewlconverter-macos | |
| path: ./publish |