From 9330354a2a6ce916d4df7193dc6af7d918b7ec70 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 4 Feb 2024 10:57:40 +0100 Subject: [PATCH] use github actions --- .github/workflows/main.yml | 22 ++++++++++++++++++++++ .woodpecker/main.yml | 20 -------------------- 2 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .woodpecker/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..53126a3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,22 @@ +on: [push, pull_request] +jobs: + build-publish: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + - name: Build + run: dotnet build + - name: Test + run: dotnet test --collect:"XPlat Code Coverage" + - name: Pack + run: dotnet pack --version-suffix ci.$GITHUB_RUN_NUMBER + - name: Publish + if: github.event_name == 'push' && github.ref_name == 'main' + run: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k ${{ secrets.BAGET_KEY }} -n \ No newline at end of file diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml deleted file mode 100644 index 1747b3d..0000000 --- a/.woodpecker/main.yml +++ /dev/null @@ -1,20 +0,0 @@ -variables: - - &image mcr.microsoft.com/dotnet/sdk:8.0-jammy -steps: - build: - image: *image - commands: dotnet build - test: - image: *image - commands: dotnet test --collect:"XPlat Code Coverage" - pack: - image: *image - commands: dotnet pack --version-suffix ci.$CI_PIPELINE_NUMBER - publish: - image: *image - when: - branch: main - event: push - commands: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k $BAGET_KEY -n - secrets: - - baget_key