From d4a9b1d14a25eb626602f41bbbead7f1aa262abd Mon Sep 17 00:00:00 2001 From: Luca Date: Wed, 10 Jul 2024 19:44:10 +0200 Subject: [PATCH] Add simple CI build --- .github/dependabot.yml | 13 +++++++++ .github/workflows/ci-build.yml | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci-build.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a33e5af --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Weekly checks for nuget package updates + - package-ecosystem: 'nuget' + directory: '/' + schedule: + interval: 'weekly' + day: 'monday' + time: '06:00' + groups: + npm-dependencies: + patterns: + - '*' # Group all updates together diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..bc9bc9d --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,53 @@ +on: + push: + branches: + - * + pull_request: + branches: + - master + - develop + types: [opened, reopened, synchronize] + workflow_call: + workflow_dispatch: + +name: ci-build + +env: + DOTNET_VERSION: 8.0.x + REGISTRY: ghcr.io + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET SDK ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore -o ./publish + + - name: Test + run: dotnet test --no-restore --verbosity normal + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: Package + path: | + publish/*.nupkg + publish/*.snupkg + publish/LucHeart.CoreOSC.dll + publish/LucHeart.CoreOSC.pdb + + retention-days: 7 + if-no-files-found: error \ No newline at end of file