From 51706af5bb76476383a70d8f918caf67013d0159 Mon Sep 17 00:00:00 2001 From: "nelson.parente" Date: Wed, 3 Dec 2025 14:27:33 +0000 Subject: [PATCH 1/4] ci: add create release wf Signed-off-by: nelson.parente --- .github/scripts/create-release.sh | 58 +++++++++++++++++++++++++++ .github/workflows/create-release.yaml | 49 ++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100755 .github/scripts/create-release.sh create mode 100644 .github/workflows/create-release.yaml diff --git a/.github/scripts/create-release.sh b/.github/scripts/create-release.sh new file mode 100755 index 000000000..f5e49047d --- /dev/null +++ b/.github/scripts/create-release.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# +# Copyright 2025 The Dapr Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ue + +# Thanks to https://ihateregex.io/expr/semver/ +SEMVER_REGEX='^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' + +REL_VERSION=`echo $1 | sed -r 's/^[vV]?([0-9].+)$/\1/'` + +if [ `echo $REL_VERSION | pcre2grep "$SEMVER_REGEX"` ]; then + echo "$REL_VERSION is a valid semantic version." +else + echo "$REL_VERSION is not a valid semantic version." + exit 1 +fi + +MAJOR_MINOR_VERSION=`echo $REL_VERSION | cut -d. -f1,2` +RELEASE_BRANCH="release-$MAJOR_MINOR_VERSION" +RELEASE_TAG="v$REL_VERSION" +SUFFIX=`echo $REL_VERSION | grep \- | cut -d- -f2 | cut -d. -f1` +if [ "$SUFFIX" == "alpha" ]; then + # Alpha releases come from the master branch as they are not complete for an RC yet. + RELEASE_BRANCH="master" +fi + +if [ `git rev-parse --verify origin/$RELEASE_BRANCH 2>/dev/null` ]; then + echo "$RELEASE_BRANCH branch already exists, checking it out ..." + git checkout $RELEASE_BRANCH +else + echo "$RELEASE_BRANCH does not exist, creating ..." + git checkout -b $RELEASE_BRANCH + git push origin $RELEASE_BRANCH +fi +echo "$RELEASE_BRANCH branch is ready." + +if [ `git rev-parse --verify $RELEASE_TAG 2>/dev/null` ]; then + echo "$RELEASE_TAG tag already exists, aborting ..." + exit 2 +fi + +echo "Tagging $RELEASE_TAG ..." +git tag $RELEASE_TAG +echo "$RELEASE_TAG is tagged." + +echo "Pushing $RELEASE_TAG tag ..." +git push origin $RELEASE_TAG +echo "$RELEASE_TAG tag is pushed." diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml new file mode 100644 index 000000000..ab0356d59 --- /dev/null +++ b/.github/workflows/create-release.yaml @@ -0,0 +1,49 @@ +# +# Copyright 2025 The Dapr Authors +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Create a release + +on: + workflow_dispatch: + inputs: + rel_version: + description: 'Release version (examples: 1.16.0-rc.1, 1.16.0)' + required: true + type: string + +permissions: {} + +jobs: + create-release: + name: Creates release branch and tag + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install required packages + run: | + sudo apt-get update + sudo apt-get install pcre2-utils + - name: Create release branch and tag + env: + GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }} + run: | + git config user.email "daprweb@diagrid.io" + git config user.name "Dapr Bot" + # Update origin with token + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + ./.github/scripts/create-release.sh ${{ inputs.rel_version }} \ No newline at end of file From b13d88d354204cae1bf02e4297825ff6c540c512 Mon Sep 17 00:00:00 2001 From: "nelson.parente" Date: Wed, 3 Dec 2025 14:52:55 +0000 Subject: [PATCH 2/4] ci: update release.md Signed-off-by: nelson.parente --- docs/development/release.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/development/release.md b/docs/development/release.md index 87684659e..67db093c4 100644 --- a/docs/development/release.md +++ b/docs/development/release.md @@ -9,7 +9,10 @@ Only the repository maintainers and release team are allowed to execute the belo ## Pre-release build +### Dapr CLI manual release process + Pre-release build will be built from `release-.` branch and versioned by git version tag suffix e.g. `-rc.0`, `-rc.1`, etc. This build is not released to users who use the latest stable version. + **Pre-release process** 1. Create a PR to update the `Dapr runtime` and `Dapr dashboard` pre-release versions in workflow and tests files wherever applicable, and merge the PR to master branch. For example, please take a look at this PR - https://github.com/dapr/cli/pull/1019. Please note that this PR is just for reference and only reflects the absolute minimum number of file changes. These versions update could lead to some other changes also. @@ -33,6 +36,12 @@ $ git push upstream v1.11.0-rc.0 7. Create new pre-release version tag (with suffix -rc.1, -rc.2, etc). 8. Repeat from 5 to 7 until all bugs are fixed. +### Dapr CLI automated release process + +The Dapr CLI automated release process is triggered by the `create-release` workflow. This workflow is triggered by the `create-release` button in the GitHub Actions UI. + +This workflow will create a new release branch and tag, and trigger the Dapr CLI build. + ## Release the stable version to users @@ -43,3 +52,7 @@ Once all bugs are fixed, stable version can be released. Create a new git versio ## Release Patch version Work on the existing `release-.` branch to release a patch version. Once all bugs are fixed, create a new patch version tag, such as `v1.11.1-rc.0`. After verifying the fixes on this pre-release, create a new git version tag such as `v1.11.1` and push the tag. CI will create the new build artifacts and release them. + +## Project Release Guidelines + +See [this document](https://github.com/dapr/community/blob/master/release-process.md) for the project's release process and guidelines. \ No newline at end of file From 61341e0ebc777fc443e474d64d5ac4344eee7215 Mon Sep 17 00:00:00 2001 From: "nelson.parente" Date: Tue, 16 Dec 2025 16:46:28 +0000 Subject: [PATCH 3/4] fix: email Signed-off-by: nelson.parente --- .github/workflows/create-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index ab0356d59..05e893fca 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -42,7 +42,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }} run: | - git config user.email "daprweb@diagrid.io" + git config user.email "dapr@dapr.io" git config user.name "Dapr Bot" # Update origin with token git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git From 16f172bc98d211c1f16a7b7f22f2b7dd61fd6b77 Mon Sep 17 00:00:00 2001 From: Nelson Parente Date: Mon, 12 Jan 2026 09:28:20 +0000 Subject: [PATCH 4/4] Update docs/development/release.md Co-authored-by: Cassie Coyle Signed-off-by: Nelson Parente --- docs/development/release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/release.md b/docs/development/release.md index 67db093c4..8a2217567 100644 --- a/docs/development/release.md +++ b/docs/development/release.md @@ -40,7 +40,7 @@ $ git push upstream v1.11.0-rc.0 The Dapr CLI automated release process is triggered by the `create-release` workflow. This workflow is triggered by the `create-release` button in the GitHub Actions UI. -This workflow will create a new release branch and tag, and trigger the Dapr CLI build. +This workflow will create a new release branch and tag, and trigger the Dapr CLI build. Ensure the new release is set to `latest` and not a `pre-release` ## Release the stable version to users