Skip to content

Commit e9b18f9

Browse files
committed
Trigger downstream release workflows using tag ref instead of default
branch
1 parent db62d7d commit e9b18f9

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/release-crate.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
owner: context.repo.owner,
170170
repo: context.repo.repo,
171171
workflow_id: 'release-github.yml',
172-
ref: context.payload.repository.default_branch,
172+
ref: '${{ needs.publish.outputs.tag }}',
173173
inputs: {
174174
tag: '${{ needs.publish.outputs.tag }}'
175175
}
@@ -183,7 +183,7 @@ jobs:
183183
owner: context.repo.owner,
184184
repo: context.repo.repo,
185185
workflow_id: 'release-npm.yml',
186-
ref: context.payload.repository.default_branch,
186+
ref: '${{ needs.publish.outputs.tag }}',
187187
inputs: {
188188
tag: '${{ needs.publish.outputs.tag }}'
189189
}
@@ -197,7 +197,7 @@ jobs:
197197
owner: context.repo.owner,
198198
repo: context.repo.repo,
199199
workflow_id: 'release-nuget.yml',
200-
ref: context.payload.repository.default_branch,
200+
ref: '${{ needs.publish.outputs.tag }}',
201201
inputs: {
202202
tag: '${{ needs.publish.outputs.tag }}'
203203
}
@@ -211,7 +211,7 @@ jobs:
211211
owner: context.repo.owner,
212212
repo: context.repo.repo,
213213
workflow_id: 'release-pypi.yml',
214-
ref: context.payload.repository.default_branch,
214+
ref: '${{ needs.publish.outputs.tag }}',
215215
inputs: {
216216
tag: '${{ needs.publish.outputs.tag }}'
217217
}
@@ -232,7 +232,7 @@ jobs:
232232
owner: context.repo.owner,
233233
repo: context.repo.repo,
234234
workflow_id: 'release-sdk-pypi.yml',
235-
ref: context.payload.repository.default_branch,
235+
ref: '${{ needs.publish.outputs.tag }}',
236236
inputs: {
237237
tag: '${{ needs.publish.outputs.tag }}'
238238
}
@@ -253,7 +253,7 @@ jobs:
253253
owner: context.repo.owner,
254254
repo: context.repo.repo,
255255
workflow_id: 'release-sdk-npm.yml',
256-
ref: context.payload.repository.default_branch,
256+
ref: '${{ needs.publish.outputs.tag }}',
257257
inputs: {
258258
tag: '${{ needs.publish.outputs.tag }}'
259259
}
@@ -274,7 +274,7 @@ jobs:
274274
owner: context.repo.owner,
275275
repo: context.repo.repo,
276276
workflow_id: 'release-sdk-gem.yml',
277-
ref: context.payload.repository.default_branch,
277+
ref: '${{ needs.publish.outputs.tag }}',
278278
inputs: {
279279
tag: '${{ needs.publish.outputs.tag }}'
280280
}

.github/workflows/release-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ jobs:
179179
owner: context.repo.owner,
180180
repo: context.repo.repo,
181181
workflow_id: 'release-homebrew.yml',
182-
ref: context.payload.repository.default_branch,
182+
ref: '${{ steps.tag.outputs.tag }}',
183183
inputs: {
184184
tag: '${{ steps.tag.outputs.tag }}'
185185
}

0 commit comments

Comments
 (0)