name: SharpCompress
on:
  push:
    branches:
      - 'master'
  pull_request:
    types: [ opened, synchronize, reopened, ready_for_review ]

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [windows-latest, ubuntu-latest]

    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
    - run: dotnet run --project build/build.csproj
    - uses: actions/upload-artifact@v4
      with:
        name: ${{ matrix.os }}-sharpcompress.nupkg
        path: artifacts/*
