name: Build and Upload on: push: paths-ignore: - 'README.md' pull_request: workflow_dispatch: jobs: build: strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-13, windows-latest] configuration: [Release] include: - os: ubuntu-latest COMMAND: Atomic.Gtk -p:PublishSingleFile=true -p:DebugType=embedded -r linux-x64 --no-self-contained -o builds/ubuntu-latest -p:BuildPlatform=Gtk ARTIFACT: builds/ubuntu-latest POSTBUILD: echo "nothing to do!" - os: macos-13 COMMAND: Atomic.Mac -o builds/macOS-latest ARTIFACT: builds/macOS-latest POSTBUILD: rm -r builds/macOS-latest/* && mv Atomic.Mac/bin/Release/net8.0-macos/Atomic.Mac.app builds/macOS-latest/Atomic.Mac.app - os: windows-latest COMMAND: Atomic.Wpf -p:PublishSingleFile=true -p:DebugType=embedded -r win-x86 --no-self-contained -o builds/windows-latest ARTIFACT: builds/windows-latest POSTBUILD: echo "nothing to do!" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.x.x - name: Install Mac workload working-directory: ./ run: dotnet workload install macos && dotnet workload restore - name: Switch XCode run: sudo xcode-select -switch /Applications/Xcode_15.1.app/Contents/Developer if: matrix.os == 'macos-13' - name: Restore dependencies run: dotnet restore - name: Build run: dotnet publish ${{ matrix.COMMAND }} -c "${{ matrix.configuration }}" - name: Post-Build run: | cp ./LICENSE ./${{ matrix.ARTIFACT }}/ ${{ matrix.POSTBUILD }} # Steps for uploading artifacts. - name: Zip to Archive run: 7z a -tzip ${{ matrix.os }}.zip ./${{ matrix.ARTIFACT }}/* - name: Upload Artifacts uses: actions/upload-artifact@v4.6.1 with: name: ${{ matrix.os }} path: ${{ matrix.os }}.zip