diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6443446 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + tags: ["v*"] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Install Cake.Tool + run: dotnet tool install --global Cake.Tool + + - name: Run Cake Build + run: dotnet cake build.cake --target=Test + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: build-output + path: build/ + + - name: Create Release (tag only) + if: startsWith(github.ref, 'refs/tags/v') + uses: softprops/action-gh-release@v2 + with: + files: build/* + generate_release_notes: true