Skip to content

Commit

Permalink
ci: update workflows to include wait steps for release and .NET build…
Browse files Browse the repository at this point in the history
… processes
  • Loading branch information
ahmet-cetinkaya committed Jan 13, 2025
1 parent 66b18db commit c2cd511
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c2cd511

Please sign in to comment.