File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99permissions :
1010 contents : write
11+ actions : write
1112
1213jobs :
1314 create-tags :
2728
2829 - name : Handle initial release tag
2930 if : github.event_name == 'create' && github.event.ref_type == 'branch'
31+ env :
32+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3033 run : |
3134 BRANCH_NAME="${{ github.event.ref }}"
3235
5053 git tag "$TAG"
5154 git push origin "$TAG"
5255
56+ echo "Triggering release workflow for $TAG"
57+ gh workflow run release.yml -f tag="$TAG"
58+
5359 - name : Handle patch release tags
5460 if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
61+ env :
62+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5563 run : |
5664 # Find all release branches
5765 RELEASE_BRANCHES=$(git branch -r | grep -E 'origin/release-[0-9]+\.[0-9]+$' | sed 's|origin/||' | sed 's/^[[:space:]]*//')
@@ -114,4 +122,8 @@ jobs:
114122 git push origin "$NEW_TAG"
115123
116124 echo "Successfully created and pushed tag $NEW_TAG"
125+
126+ # Trigger release workflow
127+ echo "Triggering release workflow for $NEW_TAG"
128+ gh workflow run release.yml -f tag="$NEW_TAG"
117129 done
Original file line number Diff line number Diff line change 11name : Release Build and Publish
22
3+ # This workflow is triggered in two ways:
4+ # 1. Automatically when a semver tag is pushed (e.g., git push origin v1.0.0)
5+ # 2. Via workflow_dispatch from manage-release-tags.yml
6+ # (needed because tags created with GITHUB_TOKEN don't trigger on.push.tags events)
37on :
48 push :
59 tags :
610 - ' v*.*.*'
11+ workflow_dispatch :
12+ inputs :
13+ tag :
14+ description : ' Tag to release (e.g., v1.0.0)'
15+ required : true
16+ type : string
717
818env :
919 REGISTRY : ghcr.io
2232 uses : actions/checkout@v4
2333 with :
2434 fetch-depth : 0
35+ # Use tag from workflow_dispatch input, otherwise use the git ref from tag push
36+ ref : ${{ inputs.tag || github.ref }}
2537
2638 - name : Free up disk space
2739 run : |
4759 - name : Parse version from tag
4860 id : version
4961 run : |
50- TAG=${GITHUB_REF#refs/tags/v}
62+ # Handle both trigger types: workflow_dispatch (from manage-release-tags) and tag push
63+ if [ -n "${{ inputs.tag }}" ]; then
64+ TAG="${{ inputs.tag }}"
65+ TAG=${TAG#v}
66+ else
67+ TAG=${GITHUB_REF#refs/tags/v}
68+ fi
5169 echo "full=$TAG" >> $GITHUB_OUTPUT
5270
5371 MAJOR=$(echo $TAG | cut -d. -f1)
You can’t perform that action at this time.
0 commit comments