diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9b2a1be --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build-pack: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + + - name: Build + run: dotnet build LinearPipe.Net.slnx -c Release + + - name: Pack + run: dotnet pack src/LinearPipe.Net/LinearPipe.Net.csproj -c Release --no-build -o artifacts + + - uses: actions/upload-artifact@v4 + with: + name: nupkg + path: artifacts/*.nupkg + + publish: + needs: build-pack + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + environment: nuget + steps: + - uses: actions/download-artifact@v4 + with: + name: nupkg + path: artifacts + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.x' + + - name: Push to NuGet + run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/Directory.Build.props b/Directory.Build.props index 58f53d2..26942a8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,6 @@ + 0.1.0 Copyright 2026 Infalligence Labs Apache-2.0 diff --git a/src/LinearPipe.Net.Bench/LinearPipe.Net.Bench.csproj b/src/LinearPipe.Net.Bench/LinearPipe.Net.Bench.csproj index 77cf642..c5434c8 100644 --- a/src/LinearPipe.Net.Bench/LinearPipe.Net.Bench.csproj +++ b/src/LinearPipe.Net.Bench/LinearPipe.Net.Bench.csproj @@ -6,6 +6,7 @@ enable enable true + false