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