From 286731b1a67447db4f106a5a07a0e35746aefd86 Mon Sep 17 00:00:00 2001 From: real-zony Date: Sun, 19 Mar 2023 11:13:30 +0800 Subject: [PATCH] ci: Adjusted the Github pipeline. Prevent artifact publication when performing PR operations. --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d04da5f..4d2e86b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,10 +17,8 @@ jobs: run: echo "::set-output name=date::$(date +'%Y%m%d')${{github.run_number}}" - name: Checkout Code uses: actions/checkout@v3 - with: - submodules: true - name: Setup .NET - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v3 with: dotnet-version: 7.0.x - name: Restore dependencies @@ -38,6 +36,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: + retention-days: 1 name: release-files path: | ./TempFiles @@ -45,6 +44,7 @@ jobs: outputs: version: ${{ steps.date.outputs.date }} release: + if: github.event_name == 'push' needs: build runs-on: ubuntu-latest steps: