Skip to content

Commit

Permalink
No PR needed for bot changes when releasing + release trigger fix (#1227
Browse files Browse the repository at this point in the history
)

* No PR needed for bot changes when releasing.

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

* Fix build trigger for release.

Signed-off-by: Artur Souza <asouza.pro@gmail.com>

---------

Signed-off-by: Artur Souza <asouza.pro@gmail.com>
  • Loading branch information
artursouza authored Mar 4, 2025
1 parent 6108547 commit 5eed695
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
25 changes: 9 additions & 16 deletions .github/scripts/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ if [ "$VARIANT" = "SNAPSHOT" ]; then
echo "Invalid snapshot version: $REL_VERSION"
exit 3
fi
branch_name="automation/update_to_next_${current_time}"
git checkout -b $branch_name

# Change is done directly in the master branch.
${script_dir}/update_sdk_version.sh $REL_VERSION
git clean -xdf
git commit -s -m "Update master version to ${REL_VERSION}" -a
git push origin $branch_name
gh pr create --repo ${GITHUB_REPOSITORY} \
--base master \
--title "Update master version to ${REL_VERSION}" \
--body "Update master version to ${REL_VERSION}"
echo "Done."
git clean -f -d
git push origin master
echo "Updated master branch with version ${REL_VERSION}."
exit 0
elif [ "$VARIANT" = "rc" ]; then
echo "Release-candidate version detected: $REL_VERSION"
Expand Down Expand Up @@ -107,15 +103,12 @@ fi

if [ "$VARIANT" = "" ]; then
git clean -xdf
echo "Creating pull request to update docs ..."
branch_name="automation/update_docs_${current_time}"
echo "Updating docs in master branch ..."
git checkout master
git reset --hard origin/master
git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG
git push origin $branch_name
gh pr create --repo ${GITHUB_REPOSITORY} \
--base master \
--title "Update master docs for ${REL_VERSION} release" \
--body "Update master docs for ${REL_VERSION} release"
git push origin master
echo "Updated docs in master branch."
fi

echo "Done."
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
run: |
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ env.BUILD_GIT_REF }}' | sed -r 's/^[vV]?([0-9].+)$/\1/')
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref '${{ env.BUILD_GIT_REF }}'

0 comments on commit 5eed695

Please sign in to comment.