Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
3ff2156
Redis 8.0.3
adamiBs Jul 6, 2025
0469255
Release 8.2.0
Peter-Sh Aug 4, 2025
00c836d
Redis 8.2.1 (#33)
adamiBs Aug 18, 2025
b896ec2
Redis 8.2.2
adobrzhansky Oct 3, 2025
60bf1c9
Initial worfklow reorganization
Peter-Sh Oct 14, 2025
cee4083
Add missing checkout
Peter-Sh Oct 14, 2025
be0465c
Add missing shell to action steps
Peter-Sh Oct 14, 2025
c2abcb8
Remove unused signing key
Peter-Sh Oct 14, 2025
603347f
Rebase to 8.x
Peter-Sh Oct 14, 2025
21036f5
Use jammy runners, as noble fails
Peter-Sh Oct 14, 2025
e78da94
Remove redundant shell
Peter-Sh Oct 14, 2025
b04ab70
Remove on workflow dispatch trigger
Peter-Sh Oct 14, 2025
c5155ac
Add branch prepare and changelog modification
Peter-Sh Oct 14, 2025
8791738
Add arch to build-source, require prepare-release
Peter-Sh Oct 14, 2025
5209f6f
Fix version bump
Peter-Sh Oct 14, 2025
fb58491
Debug changelog modification
Peter-Sh Oct 14, 2025
846896c
Fix changed files again
Peter-Sh Oct 14, 2025
0f4fb9d
Pass arch to build-source-package action
Peter-Sh Oct 14, 2025
8e66df8
Add arch to smoke tests
Peter-Sh Oct 14, 2025
7627a8c
Add smoke test archs filter
Peter-Sh Oct 15, 2025
d299a61
Fix arch filtering
Peter-Sh Oct 15, 2025
22ffd57
Fix if expression
Peter-Sh Oct 15, 2025
e36d1ad
Fix arch and add release_publish prototype
Peter-Sh Oct 15, 2025
d29bf94
Fix workflow syntax
Peter-Sh Oct 15, 2025
2de8a61
Print arn iam
Peter-Sh Oct 15, 2025
316d919
Test stagins s3 access
Peter-Sh Oct 15, 2025
016f4fc
fix aws credentials
Peter-Sh Oct 15, 2025
d3d37c9
Test existing ARN
Peter-Sh Oct 15, 2025
c6f2f42
Enable release workflow to register, update publish workflow
Peter-Sh Oct 15, 2025
e61cf93
Removed upload from the apt.yml workflow
Peter-Sh Oct 15, 2025
7d1d1b7
Fix upload syntax errors
Peter-Sh Oct 15, 2025
2ca801b
Disable running actions on push
Peter-Sh Oct 15, 2025
04b3989
Fix archs and try to use ubuntu 24
Peter-Sh Oct 15, 2025
af8f1ff
Slack notification for success on staging
Peter-Sh Oct 15, 2025
e570737
8.4-m01-int
github-actions[bot] Oct 15, 2025
637b3e6
Use github-token, output packages list
Peter-Sh Oct 15, 2025
8ebdfc1
Fix slack action
Peter-Sh Oct 15, 2025
5f8aa6e
Fix slack message expression
Peter-Sh Oct 15, 2025
1566a5b
Fix packajes_json output
Peter-Sh Oct 15, 2025
4ceca2f
Fix slack message
Peter-Sh Oct 15, 2025
7cd1dad
Fix slack message format
Peter-Sh Oct 16, 2025
85b6842
Merge release/8.4 into 8.4-m01-int (bot)
github-actions[bot] Oct 16, 2025
af7c0c9
Use ensure branch before running actions
Peter-Sh Oct 16, 2025
b258445
Fix extract VERSION
Peter-Sh Oct 16, 2025
a542407
Optimize build source, remove Ensure branch from the smokes
Peter-Sh Oct 17, 2025
55ab334
Remove arch from build source matrix
Peter-Sh Oct 17, 2025
4f4b465
Fix warnings and release_handle archive
Peter-Sh Oct 17, 2025
9aaa070
Parse release handle, support release_type, slack msgs
Peter-Sh Oct 17, 2025
3d42da2
Fix build and test syntax
Peter-Sh Oct 17, 2025
3aed560
Support for unstable build
Peter-Sh Oct 17, 2025
97fd9d8
Fix release_tag name in apt workflow
Peter-Sh Oct 17, 2025
de6a7e7
Fix release_handle json syntax
Peter-Sh Oct 17, 2025
b5ae834
Fix slack failure notification
Peter-Sh Oct 17, 2025
ba5e895
Pass releas_tag for unstable builds
Peter-Sh Oct 17, 2025
5821184
Remove run_id from the publish inputs
Peter-Sh Oct 17, 2025
c2c4edf
Fix slack action
Peter-Sh Oct 17, 2025
af7d576
Fix slack msg, add uuid for publish workflow
Peter-Sh Oct 17, 2025
9ebf20a
Fix input message
Peter-Sh Oct 17, 2025
61bf2b7
Fix var substitution in upload action
Peter-Sh Oct 17, 2025
ea5a45c
Revert changelog for testing
Peter-Sh Oct 17, 2025
f9048ac
Output redis-server logs if it's not available
Peter-Sh Oct 17, 2025
2eeff0e
Allow github token to change repository
Peter-Sh Oct 17, 2025
cc0c2fc
Fix url prefix for prod, add env
Peter-Sh Oct 18, 2025
bec27b9
Add version tag creation
Peter-Sh Oct 18, 2025
b6c494e
8.4-m01-int
github-actions[bot] Oct 17, 2025
289e69c
Merge 8.4-m01-int into release/8.4 (bot)
github-actions[bot] Oct 18, 2025
a33ee37
Release automation updates for unstable
Peter-Sh Oct 18, 2025
1508d28
llvm an libclang-dev seems not required
Peter-Sh Oct 18, 2025
53993ff
Merge-back only public releases
Peter-Sh Oct 20, 2025
8b82def
Remove 8.4-m01-int from the mainline changelog
Peter-Sh Oct 20, 2025
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
69 changes: 69 additions & 0 deletions .github/actions/build-binary-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Build binary package"
inputs:
run_id:
description: "Run ID to download artifacts from"
required: true
dist:
description: "Distribution to build for"
required: true
arch:
description: "Architecture to build for"
required: true

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- name: Determine build architecture
shell: bash
run: |
case ${{ inputs.arch }} in
i386)
BUILD_ARCH=i386
;;
arm64)
BUILD_ARCH=arm64
;;
armhf)
BUILD_ARCH=armhf
;;
*)
BUILD_ARCH=amd64
;;
esac

echo "BUILD_ARCH=${BUILD_ARCH}" >> $GITHUB_ENV
- name: Install dependencies
shell: bash
run: |
sudo apt-get update && \
sudo apt-get install -y \
sbuild debhelper \
wget make cmake clang-format lcov git openssl libssl-dev unzip rsync pkg-config
sudo sbuild-adduser $USER
- name: Prepare sbuild environment
shell: bash
run: sudo ./setup_sbuild.sh ${{ inputs.dist }} ${{ env.BUILD_ARCH }}
- name: Get source package
uses: actions/download-artifact@v4
with:
name: source-${{ inputs.dist }}
run-id: ${{ inputs.run_id }}
- name: Build binary package
shell: bash
run: |
sudo sbuild \
--nolog \
--no-run-lintian \
--host ${{ inputs.arch }} \
--build ${{ env.BUILD_ARCH }} \
--dist ${{ inputs.dist }} \
--build-dep-resolver=apt \
--chroot-setup-commands="apt-get update && apt-get install -y build-essential" \
*.dsc
- name: Upload binary package artifact
uses: actions/upload-artifact@v4
with:
name: binary-${{ inputs.dist }}-${{ inputs.arch }}
path: |
*.deb
76 changes: 76 additions & 0 deletions .github/actions/build-source-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: "Build source package"

inputs:
dist:
description: "Distribution to build for"
required: true
release_tag:
description: "Release tag to build for (value 'unstable' is supported)"
required: false

runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
sudo apt-get update && \
sudo apt-get install \
debhelper dput tcl-tls libsystemd-dev pkgconf cmake clang libssl-dev
- name: Determine version
id: determine-version
shell: bash
run: |
if [ "${{ inputs.release_tag }}" == "unstable" ]; then
VERSION="unstable"
URL="https://github.com/redis/redis/archive/refs/heads/${VERSION}.tar.gz"
else
# Version format:
# https://www.debian.org/doc/debian-policy/ch-controlfields.html#version
VERSION=$(head -1 debian/changelog | awk '{print $2}' | sed 's/(\([0-9]\+:\)\?\(.*\)-[^-]\+)$/\2/g')
echo "VERSION=${VERSION}" >> $GITHUB_ENV
URL="https://github.com/redis/redis/archive/${VERSION}.tar.gz"
fi
echo "Determined version $VERSION"
echo "URL=${URL}"
echo "URL=${URL}" >> $GITHUB_OUTPUT
- name: Get source tarball
shell: bash
run: |
curl --silent -L ${{ steps.determine-version.outputs.URL }} -o redis_${VERSION}.orig.tar.gz
- name: Build source package
shell: bash
run: |
mkdir -p redis-${VERSION}
tar --extract --gunzip --file redis_${VERSION}.orig.tar.gz --strip-components=1 -C redis-${VERSION}
sed -i 's/INSTALL_BIN=\$(PREFIX)\/bin/INSTALL_BIN=\$(DESTDIR)\$(PREFIX)\/bin/' redis-${VERSION}/src/Makefile

if [ "${{ inputs.release_tag }}" == "unstable" ]; then
echo "===== Updating all Redis module versions to 'master' ====="
find redis-${VERSION}/modules -name "Makefile" -type f | while read -r makefile; do
echo "Processing $makefile"
echo " Before change:"
grep "MODULE_VERSION" "$makefile" || echo " No MODULE_VERSION found"

# Update the MODULE_VERSION to 'master'
sed -i 's/MODULE_VERSION = .*/MODULE_VERSION = master/g' "$makefile"

echo " After change:"
grep "MODULE_VERSION" "$makefile" || echo " No MODULE_VERSION found after update"
echo "-----------------------------------"
done
echo "===== Module version updates completed ====="
fi

cp -pr debian redis-${VERSION}
sed -i "s/@RELEASE@/${{ inputs.dist }}/g" redis-${VERSION}/debian/changelog
( cd redis-${VERSION} && dpkg-buildpackage -S )
- name: Upload source package artifact
uses: actions/upload-artifact@v4
with:
name: source-${{ inputs.dist }}
path: |
redis_*.tar.xz
redis_*.dsc
redis_*.orig.tar.gz
40 changes: 40 additions & 0 deletions .github/actions/bump-debian-changelog/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
inputs:
release_tag:
description: 'Release tag to build'
required: true
release_version_branch:
description: 'Release version branch to commit to'
required: true
# release_type currently is not used, but we keep it for future use
release_type:
description: 'Type of release to upload (public, internal)'
required: true

outputs:
changed_files:
description: 'List of files that were modified'
value: ${{ steps.apply-version.outputs.changed_files }}

runs:
using: "composite"
steps:
- name: Checkout common functions
uses: actions/checkout@v4
with:
repository: redis-developer/redis-oss-release-automation
ref: main
path: redis-oss-release-automation

- name: Bump Debian Changelog
id: bump-version
shell: bash
run: |
${{ github.action_path }}/bump-debian-changelog.sh ${{ inputs.release_tag }}

- name: Create verified commit
if: steps.bump-version.outputs.changed_files != ''
uses: iarekylew00t/verified-bot-commit@v1
with:
message: ${{ inputs.release_tag }}
files: ${{ steps.bump-version.outputs.changed_files }}
ref: ${{ inputs.release_version_branch }}
116 changes: 116 additions & 0 deletions .github/actions/bump-debian-changelog/bump-debian-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
#!/bin/bash
set -e

# This script updates debian/changelog using the provided TAG
# and commits changes if any were made.

# shellcheck disable=SC2034
last_cmd_stdout=""
# shellcheck disable=SC2034
last_cmd_stderr=""
# shellcheck disable=SC2034
last_cmd_result=0
# shellcheck disable=SC2034
VERBOSITY=1



SCRIPT_DIR="$(dirname -- "$( readlink -f -- "$0"; )")"
# shellcheck disable=SC1091
. "$SCRIPT_DIR/../common/func.sh"

source_helper_file helpers.sh

# Input TAG is expected in $1
TAG="$1"

if [ -z "$TAG" ]; then
echo "Error: TAG is required as first argument"
exit 1
fi

echo "TAG: $TAG"

# Function to update changelog
update_debian_changelog() {
local changelog="$1"
local tag="$2"

if [ ! -f "$changelog" ]; then
echo "Warning: $changelog not found, skipping"
return 1
fi

echo "Updating $changelog..."

# Check if this version already exists in changelog
if grep -q "^redis (.*:$tag-" "$changelog"; then
echo "Version $tag already exists in $changelog, skipping"
return 1
fi

# Get author from the most recent entry
AUTHOR=$(grep -m 1 '^ --' "$changelog" | sed 's/^ -- \(.*>\) *.*$/\1/')

if [ -z "$AUTHOR" ]; then
echo "Error: Could not determine author from $changelog"
return 1
fi

# Create temporary file with new entry
temp_changelog=$(mktemp)

# Add new entry at the top
cat > "$temp_changelog" << EOF
redis (6:$tag-1rl1~@RELEASE@1) @RELEASE@; urgency=low

* Redis $tag: https://github.com/redis/redis/releases/tag/$tag

-- $AUTHOR $(date -R)

EOF

# Append existing changelog
cat "$changelog" >> "$temp_changelog"

# Replace original with updated version
mv "$temp_changelog" "$changelog"

echo "Successfully updated $changelog with version $tag"
return 0
}

changelog_file="debian/changelog"
# Track which files were modified
changed_files=()

# Update the changelog
if update_debian_changelog "$changelog_file" "$TAG"; then
changed_files+=("$changelog_file")
fi

# Check what files actually changed in git
mapfile -t changed_files < <(git diff --name-only "$changelog_file")

# Output the list of changed files for GitHub Actions
if [ ${#changed_files[@]} -gt 0 ]; then
echo "Files were modified:"
printf '%s\n' "${changed_files[@]}"

if [ -z "$GITHUB_OUTPUT" ]; then
GITHUB_OUTPUT=/dev/stdout
fi

# Set GitHub Actions output
changed_files_output=$(printf '%s\n' "${changed_files[@]}")
{
echo "changed_files<<EOF"
echo "$changed_files_output"
echo "EOF"
} >> "$GITHUB_OUTPUT"

echo "Changed files output set for next step"
else
echo "No files were modified"
echo "changed_files=" >> "$GITHUB_OUTPUT"
fi
27 changes: 27 additions & 0 deletions .github/actions/common/func.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Sources a helper file from multiple possible locations (GITHUB_WORKSPACE, RELEASE_AUTOMATION_DIR, or relative path)
source_helper_file() {
local helper_file="$1"
local helper_errors=""
for dir in "GITHUB_WORKSPACE:$GITHUB_WORKSPACE/redis-oss-release-automation" "RELEASE_AUTOMATION_DIR:$RELEASE_AUTOMATION_DIR" ":../redis-oss-release-automation"; do
local var_name="${dir%%:*}"
local dir="${dir#*:}"
if [ -n "$var_name" ]; then
var_name="\$$var_name"
fi
local helper_path="$dir/.github/actions/common/$helper_file"
if [ -f "$helper_path" ]; then
helper_errors=""
# shellcheck disable=SC1090
. "$helper_path"
break
else
helper_errors=$(printf "%s\n %s: %s" "$helper_errors" "$var_name" "$helper_path")
fi
done
if [ -n "$helper_errors" ]; then
echo "Error: $helper_file not found in any of the following locations: $helper_errors" >&2
exit 1
fi
}
Loading