name: Build test on: push: branches: [ master ] pull_request: branches: [ master ] workflow_dispatch: jobs: build: strategy: matrix: host: [ubuntu-latest] os: [win, linux, osx] arch: [x86, x64, arm, arm64] sc: [no-self-contained, self-contained] exclude: - os: linux arch: x86 - os: osx arch: x86 - os: osx arch: arm runs-on: ${{ matrix.host }} env: APP_NAME: nestiler PROJECT_PATH: ./NesTiler OUTPUT_DIR: output CONFIGURATION: Release OUTPUT_SUBDIR: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.sc }} steps: - name: Fix line endings run: git config --global core.autocrlf false - name: Checkout uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: dotnet-version: 6.0.x - name: Build env: SC_OPS: ${{ matrix.sc == 'self-contained' && '--self-contained true' || '--no-self-contained' }} run: dotnet publish ${{ env.PROJECT_PATH }} -c ${{ env.CONFIGURATION }} -r ${{ matrix.os }}-${{ matrix.arch }} -p:PublishSingleFile=true ${{ env.SC_OPS }} -o ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}/${{ env.APP_NAME }} -p:IncludeAllContentForSelfExtract=true - name: Upload artifact uses: actions/upload-artifact@v3 with: name: ${{ env.OUTPUT_SUBDIR }} path: ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT_SUBDIR }}