Skip to content

Commit c2cd511

Browse files
ci: update workflows to include wait steps for release and .NET build processes
1 parent 66b18db commit c2cd511

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,23 @@ name: NuGet Publish
22

33
on:
44
push:
5-
branches:
6-
- main
5+
tags:
6+
- "v*.*.*"
77

88
jobs:
9+
wait-for-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Wait for Release workflow
13+
uses: lewagon/wait-on-check-action@v1.3.1
14+
with:
15+
ref: ${{ github.ref }}
16+
check-name: 'create-release'
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
wait-interval: 10
19+
920
publish-nuget:
21+
needs: wait-for-release
1022
runs-on: ubuntu-latest
1123
steps:
1224
- name: Checkout code
@@ -20,4 +32,4 @@ jobs:
2032
dotnet build --configuration Release
2133
dotnet pack --configuration Release --no-build
2234
dotnet nuget push **/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
23-
35+

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,19 @@ on:
66
- "v*.*.*"
77

88
jobs:
9-
build:
9+
wait-for-dotnet:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Wait for .NET workflow
13+
uses: lewagon/wait-on-check-action@v1.3.1
14+
with:
15+
ref: ${{ github.ref }}
16+
check-name: 'build'
17+
repo-token: ${{ secrets.GITHUB_TOKEN }}
18+
wait-interval: 10
19+
20+
create-release:
21+
needs: wait-for-dotnet
1022
runs-on: ubuntu-latest
1123
steps:
1224
- name: GH Release

0 commit comments

Comments
 (0)