From 5264e9bc2c5e4a2078444496f4787a012a7a21da Mon Sep 17 00:00:00 2001 From: Fredi Kats Date: Sun, 24 Dec 2023 22:46:32 +0100 Subject: [PATCH] FIx working directory in workflow --- .github/workflows/build-test.yml | 10 ++++++---- .github/workflows/nuget-publish.yml | 14 ++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e5072fd..7052bf4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -17,10 +17,6 @@ jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ env.working-directory }} - steps: - run: git config --global core.autocrlf input - uses: actions/checkout@v3 @@ -31,10 +27,16 @@ jobs: dotnet-version: ${{ env.dotnet-version }} - name: Restore dependencies + run: + working-directory: ${{ env.working-directory }} run: dotnet restore - name: Build + run: + working-directory: ${{ env.working-directory }} run: dotnet build -c Release --no-restore --verbosity normal - name: Test + run: + working-directory: ${{ env.working-directory }} run: dotnet test -c Release --no-build --verbosity normal \ No newline at end of file diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index 70c3b56..dcc2236 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -13,10 +13,6 @@ jobs: build: runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ env.working-directory }} - steps: - run: git config --global core.autocrlf input - uses: actions/checkout@v3 @@ -27,16 +23,26 @@ jobs: dotnet-version: ${{ env.dotnet-version }} - name: Restore dependencies + run: + working-directory: ${{ env.working-directory }} run: dotnet restore - name: Build + run: + working-directory: ${{ env.working-directory }} run: dotnet build -c Release /p:ContinuousIntegrationBuild=true --no-restore --verbosity normal - name: Test + run: + working-directory: ${{ env.working-directory }} run: dotnet test -c Release --no-build --verbosity normal - name: Publish to Nuget + run: + working-directory: ${{ env.working-directory }} run: dotnet nuget push ${{ env.release-directory }}/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate - name: Publish to Nuget symbols + run: + working-directory: ${{ env.working-directory }} run: dotnet nuget push ${{ env.release-directory }}/*.snupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file