From dff654af5cf94943c9d9d675d39c155d75dde3ba Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 27 Feb 2024 19:15:33 -0500 Subject: [PATCH] Add nuget package and PR workflows --- .github/workflows/build_nupkg.yml | 43 +++++++++++++++++++++++++++++++ .github/workflows/check_pr.yml | 17 ++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/build_nupkg.yml create mode 100644 .github/workflows/check_pr.yml diff --git a/.github/workflows/build_nupkg.yml b/.github/workflows/build_nupkg.yml new file mode 100644 index 0000000..c52e9fb --- /dev/null +++ b/.github/workflows/build_nupkg.yml @@ -0,0 +1,43 @@ +name: Nuget Pack + +on: + push: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Pack + run: dotnet pack + + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: 'Nuget Package' + path: 'bin/Release/*.nupkg' + + - name: Upload to rolling + uses: ncipollo/release-action@v1.14.0 + with: + allowUpdates: True + artifacts: 'bin/Release/*.nupkg' + body: 'Last built commit: ${{ github.sha }}' + name: 'Rolling Release' + prerelease: True + replacesArtifacts: True + tag: "rolling" + updateOnlyUnreleased: True diff --git a/.github/workflows/check_pr.yml b/.github/workflows/check_pr.yml new file mode 100644 index 0000000..bba92af --- /dev/null +++ b/.github/workflows/check_pr.yml @@ -0,0 +1,17 @@ +name: Build PR + +on: [pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Build + run: dotnet build \ No newline at end of file