Skip to content

Commit 5eed695

Browse files
authored
No PR needed for bot changes when releasing + release trigger fix (#1227)
* No PR needed for bot changes when releasing. Signed-off-by: Artur Souza <[email protected]> * Fix build trigger for release. Signed-off-by: Artur Souza <[email protected]> --------- Signed-off-by: Artur Souza <[email protected]>
1 parent 6108547 commit 5eed695

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

.github/scripts/create-release.sh

+9-16
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@ if [ "$VARIANT" = "SNAPSHOT" ]; then
3838
echo "Invalid snapshot version: $REL_VERSION"
3939
exit 3
4040
fi
41-
branch_name="automation/update_to_next_${current_time}"
42-
git checkout -b $branch_name
41+
42+
# Change is done directly in the master branch.
4343
${script_dir}/update_sdk_version.sh $REL_VERSION
44-
git clean -xdf
4544
git commit -s -m "Update master version to ${REL_VERSION}" -a
46-
git push origin $branch_name
47-
gh pr create --repo ${GITHUB_REPOSITORY} \
48-
--base master \
49-
--title "Update master version to ${REL_VERSION}" \
50-
--body "Update master version to ${REL_VERSION}"
51-
echo "Done."
45+
git clean -f -d
46+
git push origin master
47+
echo "Updated master branch with version ${REL_VERSION}."
5248
exit 0
5349
elif [ "$VARIANT" = "rc" ]; then
5450
echo "Release-candidate version detected: $REL_VERSION"
@@ -107,15 +103,12 @@ fi
107103

108104
if [ "$VARIANT" = "" ]; then
109105
git clean -xdf
110-
echo "Creating pull request to update docs ..."
111-
branch_name="automation/update_docs_${current_time}"
106+
echo "Updating docs in master branch ..."
107+
git checkout master
112108
git reset --hard origin/master
113109
git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG
114-
git push origin $branch_name
115-
gh pr create --repo ${GITHUB_REPOSITORY} \
116-
--base master \
117-
--title "Update master docs for ${REL_VERSION} release" \
118-
--body "Update master docs for ${REL_VERSION} release"
110+
git push origin master
111+
echo "Updated docs in master branch."
119112
fi
120113

121114
echo "Done."

.github/workflows/create-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ jobs:
6868
env:
6969
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
7070
run: |
71-
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ env.BUILD_GIT_REF }}' | sed -r 's/^[vV]?([0-9].+)$/\1/')
71+
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref '${{ env.BUILD_GIT_REF }}'

0 commit comments

Comments
 (0)