Skip to content

Commit ef337ff

Browse files
committed
Release created by GitHub actions won't trigger the "on release" event, so use the "workflow_run" instead.
See https://github.com/orgs/community/discussions/25281
1 parent c25c767 commit ef337ff

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/release_capi.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
on:
2-
push:
3-
branches: [main]
42
release:
53
types: [published]
4+
workflow_run:
5+
workflows:
6+
- Release
7+
types:
8+
- completed
69
pull_request:
710
types: [labeled]
811
name: Append C-API artifact to latest release
912
jobs:
1013
deploy_linux_binaries:
11-
if: ${{ github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
14+
if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
1215
runs-on: ubuntu-20.04
1316
env:
1417
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -37,7 +40,7 @@ jobs:
3740
omitNameDuringUpdate: true
3841
omitPrereleaseDuringUpdate: true
3942
deploy_windows_binaries:
40-
if: ${{ github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
43+
if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
4144
runs-on: windows-2019
4245
steps:
4346
- id: latest-release
@@ -64,7 +67,7 @@ jobs:
6467
omitNameDuringUpdate: true
6568
omitPrereleaseDuringUpdate: true
6669
deploy_macos_binaries:
67-
if: ${{ github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
70+
if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }}
6871
runs-on: macos-12
6972
steps:
7073
- id: latest-release

0 commit comments

Comments
 (0)