添加Release工作流以支持自动化发布过程 #16
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: | |
| pull_request: | |
| workflow_call: | |
| jobs: | |
| run: | |
| name: build | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| edition: [CommandLine, Universal] | |
| architecture: [x64, arm64] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Publish Aot | |
| env: | |
| RuntimeIdentifier: win-${{ matrix.architecture }} | |
| PublishDir: ./publish/win-${{ matrix.architecture }} | |
| run: | | |
| cd ./FluentLauncher.${{ matrix.edition }}Installer | |
| dotnet publish --configuration Release --self-contained true --output $env:PublishDir -p:PlatformTarget=${{matrix.architecture}} --nologo | |
| - name: Upload to Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.edition }}Installer-win-${{ matrix.architecture }} | |
| path: "FluentLauncher.${{ matrix.edition }}Installer\\publish\\win-${{ matrix.architecture }}\\FluentLauncher.${{ matrix.edition }}Installer.exe" |