File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,12 @@ name: "Package Release"
2
2
run-name : " Package Release ${{ github.ref_name }}"
3
3
4
4
on :
5
- push :
6
- tags :
7
- - " *"
5
+ workflow_call :
6
+ inputs :
7
+ ref :
8
+ description : " The git reference to build"
9
+ type : string
10
+ required : true
8
11
9
12
jobs :
10
13
build-pecl :
31
34
with :
32
35
# Manually specify a ref. When actions/checkout is run for a tag without a ref, it looks up the underlying
33
36
# commit and specifically fetches this to the refs/tags/<tag> ref, which denies us access to the tag message
34
- ref : ${{ github .ref }}
37
+ ref : ${{ inputs .ref }}
35
38
submodules : true
36
39
37
40
- name : " Set up drivers-github-tools"
@@ -111,6 +114,7 @@ jobs:
111
114
- uses : actions/checkout@v4
112
115
with :
113
116
submodules : true
117
+ ref : ${{ inputs.ref }}
114
118
115
119
- name : " Build Driver"
116
120
id : build-driver
@@ -167,6 +171,8 @@ jobs:
167
171
shell : bash
168
172
169
173
- uses : actions/checkout@v4
174
+ with :
175
+ ref : ${{ inputs.ref }}
170
176
171
177
- name : " Set up drivers-github-tools"
172
178
uses : mongodb-labs/drivers-github-tools/setup@v2
Original file line number Diff line number Diff line change @@ -155,11 +155,20 @@ jobs:
155
155
- name : " Update release information"
156
156
run : echo "RELEASE_URL=$(gh release edit ${{ env.PACKAGE_VERSION }} --title "${{ env.PACKAGE_VERSION }}" --notes-file release-message)" >> "$GITHUB_ENV"
157
157
158
- # Pushing the release tag starts build processes that then produce artifacts for the release
159
158
- name : " Push release tag"
160
159
run : git push origin ${{ env.PACKAGE_VERSION }}
161
160
162
161
- name : " Set summary"
163
162
run : |
164
163
echo '🚀 Created tag and drafted release for version [${{ inputs.version }}](${{ env.RELEASE_URL }})' >> $GITHUB_STEP_SUMMARY
165
164
echo '✍️ You may now update the release notes and publish the release when ready' >> $GITHUB_STEP_SUMMARY
165
+
166
+ package-release :
167
+ needs : prepare-release
168
+ name : " Create Release Packages"
169
+ uses : ./.github/workflows/package-release.yml
170
+ with :
171
+ ref : refs/tags/${{ inputs.version }}
172
+ secrets : inherit
173
+ permissions :
174
+ id-token : write
You can’t perform that action at this time.
0 commit comments