From c2cd5117c398a4086842bea84e8e1d3c5eeac061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87etinkaya?= Date: Mon, 13 Jan 2025 14:25:32 +0300 Subject: [PATCH] ci: update workflows to include wait steps for release and .NET build processes --- .github/workflows/nuget-publish.yml | 18 +++++++++++++++--- .github/workflows/release.yml | 14 +++++++++++++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index 6d68041..82128fe 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -2,11 +2,23 @@ name: NuGet Publish on: push: - branches: - - main + tags: + - "v*.*.*" jobs: + wait-for-release: + runs-on: ubuntu-latest + steps: + - name: Wait for Release workflow + uses: lewagon/wait-on-check-action@v1.3.1 + with: + ref: ${{ github.ref }} + check-name: 'create-release' + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 10 + publish-nuget: + needs: wait-for-release runs-on: ubuntu-latest steps: - name: Checkout code @@ -20,4 +32,4 @@ jobs: dotnet build --configuration Release dotnet pack --configuration Release --no-build dotnet nuget push **/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate - + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86c05eb..d9e0900 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,19 @@ on: - "v*.*.*" jobs: - build: + wait-for-dotnet: + runs-on: ubuntu-latest + steps: + - name: Wait for .NET workflow + uses: lewagon/wait-on-check-action@v1.3.1 + with: + ref: ${{ github.ref }} + check-name: 'build' + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 10 + + create-release: + needs: wait-for-dotnet runs-on: ubuntu-latest steps: - name: GH Release