# Manual-only release build (PLAN ยง7.2): no push or pull_request trigger. # Each RID job runs build -> test -> publish/pack -> upload; a failing step # skips the rest of that job, so a RID whose tests fail produces no artifact. # win-x64 packs an Inno Setup installer; linux-x64 a tar.gz; osx-arm64 a # drag-to-Applications dmg. # Artifacts are uploaded unzipped (upload-artifact archive: false): each RID's # dist/ holds exactly one file, and its name becomes the artifact name. # No GitHub Release is created. name: Build on: workflow_dispatch: permissions: contents: read env: DOTNET_NOLOGO: "true" DOTNET_CLI_TELEMETRY_OPTOUT: "true" jobs: build: name: ${{ matrix.rid }} runs-on: ${{ matrix.os }} strategy: # Every RID stands on its own: one failure does not cancel the others. fail-fast: false matrix: include: - rid: win-x64 os: windows-latest - rid: linux-x64 os: ubuntu-latest - rid: osx-arm64 os: macos-latest defaults: run: shell: bash steps: - name: Checkout uses: actions/checkout@v4 - name: Set up .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 10.0.x - name: Build run: dotnet build YKanBan.slnx -c Release - name: Test run: dotnet test YKanBan.slnx -c Release --no-build - name: Publish run: > dotnet publish YKanBan/YKanBan.csproj -c Release -r ${{ matrix.rid }} --self-contained -o publish/${{ matrix.rid }} - name: Pack run: | version="$(dotnet msbuild YKanBan/YKanBan.csproj -getProperty:Version)" bash packaging/package.sh ${{ matrix.rid }} publish/${{ matrix.rid }} dist "$version" - name: Upload artifact uses: actions/upload-artifact@v7 with: # archive: false uploads the single matched file as-is (no zip # wrapper); the file name doubles as the artifact name. path: dist/* archive: false if-no-files-found: error