File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 5555 - run : |
5656 ./gradlew publishAllPublicationsToStagingRepository
5757 export STAGING=$(printf "%s" $(./gradlew stagingPath --quiet))
58- gh release create ${{ github.event.workflow_run.head_sha }} --generate-notes $STAGING/* --verify-tag
58+ gh release create ${{ github.event.workflow_run.head_branch }} --generate-notes $STAGING/* --verify-tag
5959 if: ${{ steps.detect-tag.outputs.is_tag == 'true' }}
6060 env:
6161 GH_TOKEN: ${{ github.token }}
Original file line number Diff line number Diff line change @@ -88,4 +88,26 @@ merge-squash:
8888 gh pr merge --squash --delete-branch --auto
8989
9090watch-full :
91- @gh run watch $$($(call gh_head_run_id, "full") ) --exit-status
91+ @set -e; \
92+ wf=" full" ; \
93+ commit=" $( HEAD) " ; \
94+ printf ' %s\n' " Waiting for workflow '$$ wf' run for commit $$ commit..." ; \
95+ attempts=0; \
96+ max_attempts=$$ {GH_WATCH_MAX_ATTEMPTS:-40}; \
97+ sleep_seconds=$$ {GH_WATCH_SLEEP_SECONDS:-3}; \
98+ run_id=" " ; \
99+ while [ $$ attempts -lt $$ max_attempts ]; do \
100+ run_id=$$(gh run list --workflow "$$wf" --commit "$$commit" --json databaseId --jq '.[0].databaseId // empty' ) ; \
101+ if [ -n " $$ run_id" ]; then \
102+ break ; \
103+ fi ; \
104+ attempts=$$((attempts+1 ) ); \
105+ sleep $$ sleep_seconds; \
106+ done ; \
107+ if [ -z " $$ run_id" ]; then \
108+ printf ' %s\n' " ERROR: No '$$ wf' run found for commit $$ commit after $$ ((attempts*sleep_seconds)) seconds." 1>&2 ; \
109+ printf ' %s\n' " Hint: ensure the workflow triggers include this branch/PR event." 1>&2 ; \
110+ exit 1; \
111+ fi ; \
112+ printf ' %s\n' " Found run ID $$ run_id. Watching..." ; \
113+ gh run watch " $$ run_id" --exit-status
You can’t perform that action at this time.
0 commit comments