From fb337ab4ca6e5df26c8a9a57d3781f5e49aeffbc Mon Sep 17 00:00:00 2001 From: Brian Pursley Date: Mon, 22 Apr 2024 12:11:17 -0400 Subject: [PATCH 1/3] upgrade deprecated github actions --- .github/workflows/build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eabe97a..42398c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,12 +19,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.ref }} # This checks out the commit that triggered the workflow run - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' @@ -51,29 +51,29 @@ jobs: run: Npgmq.Test/scripts/run-tests.sh 0.31.0 - name: Pack - if: startsWith(github.ref, 'refs/tags/v') + #if: startsWith(github.ref, 'refs/tags/v') run: dotnet pack Npgmq/Npgmq.csproj --no-build --configuration Release /p:PackageVersion=${{ env.VERSION }} /p:CopyrightYear=$(date +%Y) --output out - - uses: actions/upload-artifact@v2 - if: startsWith(github.ref, 'refs/tags/v') + - uses: actions/upload-artifact@v4 + #if: startsWith(github.ref, 'refs/tags/v') with: name: build-artifact path: out publish: needs: build - if: startsWith(github.ref, 'refs/tags/v') + #if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: build-artifact path: out - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - - name: Push - run: dotnet nuget push "out/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json +# - name: Push +# run: dotnet nuget push "out/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json From 89470b511dddb5b292da7900d905c111d50dd04d Mon Sep 17 00:00:00 2001 From: Brian Pursley Date: Mon, 22 Apr 2024 12:15:05 -0400 Subject: [PATCH 2/3] uncomment build conditions --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42398c1..043ad11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,18 +51,18 @@ jobs: run: Npgmq.Test/scripts/run-tests.sh 0.31.0 - name: Pack - #if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') run: dotnet pack Npgmq/Npgmq.csproj --no-build --configuration Release /p:PackageVersion=${{ env.VERSION }} /p:CopyrightYear=$(date +%Y) --output out - uses: actions/upload-artifact@v4 - #if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') with: name: build-artifact path: out publish: needs: build - #if: startsWith(github.ref, 'refs/tags/v') + if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 @@ -75,5 +75,5 @@ jobs: with: dotnet-version: '8.0.x' -# - name: Push -# run: dotnet nuget push "out/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json + - name: Push + run: dotnet nuget push "out/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json From 823d1de26f0f8bc96871e0f3890313e9e48dd0c0 Mon Sep 17 00:00:00 2001 From: Brian Pursley Date: Mon, 22 Apr 2024 12:21:50 -0400 Subject: [PATCH 3/3] add pull request trigger --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 043ad11..bd171e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,7 @@ on: - '*' tags: - 'v[0-9]+.[0-9]+.[0-9]+.*' + pull_request: workflow_dispatch: env: