Skip to content

Commit 5860553

Browse files
committed
Enhance gem build and publish steps in release workflow for better error handling
1 parent 94679bf commit 5860553

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,21 @@ name: Release and Publish
33
on:
44
release:
55
types: [ published ]
6+
workflow_run:
7+
workflows: ["Update Version"]
8+
types: [completed]
9+
branches: [main]
610

711
jobs:
812
update-changelog-and-publish:
913
runs-on: ubuntu-latest
1014
permissions:
1115
contents: write
1216
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17+
# Only run if the workflow_run was successful or if triggered by release event
18+
if: |
19+
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
20+
(github.event_name == 'release')
1321
1422
steps:
1523
- name: Checkout code

0 commit comments

Comments
 (0)