how to build crystal for multiple OS on: push: pull_request: branches: [main] jobs: build: strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Download source uses: actions/checkout@v2 - name: Install Crystal uses: crystal-lang/install-crystal@v1 - name: Build for linux if: ${{ matrix.os != 'macos-latest' }} run: shards build --production --release --static --no-debug -obin/${{ matrix.os }} - name: Build for macos if: ${{ matrix.os == 'macos-latest' }} run: shards build --production --release --no-debug -obin/${{ matrix.os }} - name: Upload artifact uses: actions/upload-artifact@v3 with: name: artifact-${{matrix.os}} path: bin/${{matrix.os}} #githubactions #pipeline #crystal