Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/scripts/create-release.sh
Original file line number Diff line number Diff line change
@@ -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."
49 changes: 49 additions & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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 }}
45 changes: 45 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Release Guide

This document describes how to release Dapr Components Contrib along with associated artifacts.

## Prerequisites

Only maintainers and the release team should run releases.

## Pre-release

Pre-releases use tags like `v1.11.0-rc.0`, `-rc.1`, and so on. They are created through the GitHub Actions workflow.

### Steps

1. Update the Dapr runtime and dashboard versions in workflows or tests if needed. Merge that change to master.

2. Open GitHub Actions and click the **create-release** workflow.

3. Press the **Run workflow** button.
The workflow will:

* create the `release-<major>.<minor>` branch
* create the pre-release tag
* build the artifacts

4. Test the produced build.

5. If there are issues, fix them in the release branch and trigger the workflow again by creating a new pre-release tag (for example `-rc.1`).

6. Repeat until the build is good.

## Stable Release

Create a stable tag without the rc suffix (for example `v1.11.0`).
CI will build and publish the release.

## Patch Releases

Use the existing release branch.
Create a new pre-release tag like `v1.11.1-rc.0`, test it, and when ready tag the stable version `v1.11.1`.
CI will build and publish it.

## Project Release Guidelines

See [this document](https://github.com/dapr/community/blob/master/release-process.md) for the project's release process and guidelines.
Loading