Skip to content

workflow

workflow #2

Workflow file for this run

name: Bloqbit CI
on:
push:
branches: ["**"]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
rid: win-x64
- os: ubuntu-latest
rid: linux-x64
- os: macos-latest
rid: osx-x64
name: Build for ${{ matrix.rid }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: "9.0.x"
- name: Publish for ${{ matrix.rid }}
run: dotnet publish Bloqbit.csproj -c Release -r ${{ matrix.rid }} -p:PublishSingleFile=true -o ./publish/${{ matrix.rid }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: bbcore-${{ matrix.rid }}
path: ./publish/${{ matrix.rid }}
package:
name: Package builds
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download win-x64
uses: actions/download-artifact@v4
with:
name: bbcore-win-x64
path: ./merged/win-x64
- name: Download linux-x64
uses: actions/download-artifact@v4
with:
name: bbcore-linux-x64
path: ./merged/linux-x64
- name: Download osx-x64
uses: actions/download-artifact@v4
with:
name: bbcore-osx-x64
path: ./merged/osx-x64
- name: Combine outputs
run: |
mkdir -p ./final
find ./merged -type f -exec cp {} ./final/ \;
- name: Upload merged artifact
uses: actions/upload-artifact@v4
with:
name: Bloqbit-Output
path: ./final
- name: Cleanup merged artifacts
if: always()
run: |
rm -rf ./merged
rm -rf ./final