Skip to content

Commit 2a4db5d

Browse files
authored
Merge pull request #5777 from redis/backport/5773-macos-only-release
Backport #5773: Temporary macOS-only release pipeline
2 parents ee4746b + e6015f4 commit 2a4db5d

4 files changed

Lines changed: 156 additions & 75 deletions

File tree

.github/workflows/aws-upload-prod.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ jobs:
8585
if [[ -z "$downloadLatestFolderPath" || -z "$upgradeLatestFolderPath" ]]; then
8686
exit 1;
8787
fi
88-
# remove previous build from the latest directory /public/latest
89-
aws s3 rm s3://${AWS_BUCKET_NAME}/${downloadLatestFolderPath} --recursive
88+
# remove only macOS builds from latest (preserve Linux/Windows)
89+
aws s3 rm s3://${AWS_BUCKET_NAME}/${downloadLatestFolderPath}/ --recursive --exclude "*" --include "*mac*" --include "*darwin*" --include "latest-mac*"
9090
91-
# remove previous build from the upgrade directory /public/upgrades
92-
aws s3 rm s3://${AWS_BUCKET_NAME}/${upgradeLatestFolderPath} --recursive
91+
# remove only macOS builds from upgrades (preserve Linux/Windows)
92+
aws s3 rm s3://${AWS_BUCKET_NAME}/${upgradeLatestFolderPath}/ --recursive --exclude "*" --include "*mac*" --include "*darwin*" --include "latest-mac*"
9393
9494
# copy current version apps for download to /public/latest
9595
aws s3 cp s3://${AWS_BUCKET_NAME}/private/${applicationVersion}/ \
@@ -124,53 +124,53 @@ jobs:
124124
[objectUpgrade]=${appFileName}'-mac-arm64.zip'
125125
)
126126
127-
declare -A tag02=(
128-
[arch]='x64'
129-
[platform]='windows'
130-
[objectDownload]=${appFileName}'-win-installer.exe'
131-
)
127+
# declare -A tag02=(
128+
# [arch]='x64'
129+
# [platform]='windows'
130+
# [objectDownload]=${appFileName}'-win-installer.exe'
131+
# )
132132
133-
declare -A tag03=(
134-
[arch]='x64'
135-
[platform]='linux_AppImage'
136-
[objectDownload]=${appFileName}'-linux-x86_64.AppImage'
137-
)
133+
# declare -A tag03=(
134+
# [arch]='x64'
135+
# [platform]='linux_AppImage'
136+
# [objectDownload]=${appFileName}'-linux-x86_64.AppImage'
137+
# )
138138
139-
declare -A tag04=(
140-
[arch]='x64'
141-
[platform]='linux_deb'
142-
[objectDownload]=${appFileName}'-linux-amd64.deb'
143-
)
139+
# declare -A tag04=(
140+
# [arch]='x64'
141+
# [platform]='linux_deb'
142+
# [objectDownload]=${appFileName}'-linux-amd64.deb'
143+
# )
144144
145-
declare -A tag05=(
146-
[arch]='x64'
147-
[platform]='linux_rpm'
148-
[objectDownload]=${appFileName}'-linux-x86_64.rpm'
149-
)
145+
# declare -A tag05=(
146+
# [arch]='x64'
147+
# [platform]='linux_rpm'
148+
# [objectDownload]=${appFileName}'-linux-x86_64.rpm'
149+
# )
150150
151-
declare -A tag06=(
152-
[arch]='x64'
153-
[platform]='linux_snap'
154-
[objectDownload]=${appFileName}'-linux-amd64.snap'
155-
)
151+
# declare -A tag06=(
152+
# [arch]='x64'
153+
# [platform]='linux_snap'
154+
# [objectDownload]=${appFileName}'-linux-amd64.snap'
155+
# )
156156
157-
declare -A tag07=(
158-
[arch]='arm64'
159-
[platform]='linux_AppImage'
160-
[objectDownload]=${appFileName}'-linux-arm64.AppImage'
161-
)
157+
# declare -A tag07=(
158+
# [arch]='arm64'
159+
# [platform]='linux_AppImage'
160+
# [objectDownload]=${appFileName}'-linux-arm64.AppImage'
161+
# )
162162
163-
declare -A tag08=(
164-
[arch]='arm64'
165-
[platform]='linux_deb'
166-
[objectDownload]=${appFileName}'-linux-arm64.deb'
167-
)
163+
# declare -A tag08=(
164+
# [arch]='arm64'
165+
# [platform]='linux_deb'
166+
# [objectDownload]=${appFileName}'-linux-arm64.deb'
167+
# )
168168
169-
declare -A tag09=(
170-
[arch]='arm64'
171-
[platform]='linux_rpm'
172-
[objectDownload]=${appFileName}'-linux-aarch64.rpm'
173-
)
169+
# declare -A tag09=(
170+
# [arch]='arm64'
171+
# [platform]='linux_rpm'
172+
# [objectDownload]=${appFileName}'-linux-aarch64.rpm'
173+
# )
174174
175175
# TODO: arm64 snap disabled — no arm64 snap template in electron-builder
176176
# https://github.com/electron-userland/electron-builder/issues/8167

.github/workflows/build.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ on:
2323
type: boolean
2424

2525
jobs:
26-
build-linux:
27-
if: contains(inputs.target, 'linux') || inputs.target == 'all'
28-
uses: ./.github/workflows/pipeline-build-linux.yml
29-
secrets: inherit
30-
with:
31-
environment: ${{ inputs.environment }}
32-
target: ${{ inputs.target }}
33-
debug: ${{ inputs.debug }}
34-
enterprise: ${{ inputs.enterprise }}
26+
# build-linux:
27+
# if: contains(inputs.target, 'linux') || inputs.target == 'all'
28+
# uses: ./.github/workflows/pipeline-build-linux.yml
29+
# secrets: inherit
30+
# with:
31+
# environment: ${{ inputs.environment }}
32+
# target: ${{ inputs.target }}
33+
# debug: ${{ inputs.debug }}
34+
# enterprise: ${{ inputs.enterprise }}
3535

3636
build-macos:
3737
if: contains(inputs.target, 'macos') || inputs.target == 'all'
@@ -43,20 +43,20 @@ jobs:
4343
debug: ${{ inputs.debug }}
4444
enterprise: ${{ inputs.enterprise }}
4545

46-
build-windows:
47-
if: contains(inputs.target, 'windows') || inputs.target == 'all'
48-
uses: ./.github/workflows/pipeline-build-windows.yml
49-
secrets: inherit
50-
with:
51-
environment: ${{ inputs.environment }}
52-
debug: ${{ inputs.debug }}
53-
enterprise: ${{ inputs.enterprise }}
54-
55-
build-docker:
56-
if: contains(inputs.target, 'docker') || inputs.target == 'all'
57-
uses: ./.github/workflows/pipeline-build-docker.yml
58-
secrets: inherit
59-
with:
60-
environment: ${{ inputs.environment }}
61-
debug: ${{ inputs.debug }}
62-
enterprise: ${{ inputs.enterprise }}
46+
# build-windows:
47+
# if: contains(inputs.target, 'windows') || inputs.target == 'all'
48+
# uses: ./.github/workflows/pipeline-build-windows.yml
49+
# secrets: inherit
50+
# with:
51+
# environment: ${{ inputs.environment }}
52+
# debug: ${{ inputs.debug }}
53+
# enterprise: ${{ inputs.enterprise }}
54+
55+
# build-docker:
56+
# if: contains(inputs.target, 'docker') || inputs.target == 'all'
57+
# uses: ./.github/workflows/pipeline-build-docker.yml
58+
# secrets: inherit
59+
# with:
60+
# environment: ${{ inputs.environment }}
61+
# debug: ${{ inputs.debug }}
62+
# enterprise: ${{ inputs.enterprise }}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: GitHub Release Upload
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
upload:
11+
name: Upload assets to GitHub draft release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Download builds
17+
uses: actions/download-artifact@v4
18+
with:
19+
name: 'all-builds'
20+
path: release
21+
22+
- name: Read version and find draft release
23+
id: find-release
24+
env:
25+
GH_TOKEN: ${{ github.token }}
26+
run: |
27+
APP_VERSION=$(jq -r '.version' redisinsight/package.json)
28+
echo "version=${APP_VERSION}" >> "$GITHUB_OUTPUT"
29+
30+
RELEASE_TAG=$(gh release list --json tagName,isDraft \
31+
--jq ".[] | select(.isDraft and .tagName == \"${APP_VERSION}\") | .tagName" \
32+
| head -n 1)
33+
34+
if [ -z "$RELEASE_TAG" ]; then
35+
echo "::warning::No draft release found for tag '${APP_VERSION}'. Skipping upload."
36+
echo "found=false" >> "$GITHUB_OUTPUT"
37+
else
38+
echo "Draft release found: ${RELEASE_TAG}"
39+
echo "found=true" >> "$GITHUB_OUTPUT"
40+
echo "tag=${RELEASE_TAG}" >> "$GITHUB_OUTPUT"
41+
fi
42+
43+
- name: Upload desktop installers to draft release
44+
if: steps.find-release.outputs.found == 'true'
45+
env:
46+
GH_TOKEN: ${{ github.token }}
47+
run: |
48+
TAG="${{ steps.find-release.outputs.tag }}"
49+
50+
PATTERNS=(
51+
"Redis-Insight-mac-x64.dmg"
52+
"Redis-Insight-mac-arm64.dmg"
53+
# "Redis-Insight-win-installer.exe"
54+
# "Redis-Insight-linux-x86_64.AppImage"
55+
# "Redis-Insight-linux-arm64.AppImage"
56+
# "Redis-Insight-linux-amd64.deb"
57+
# "Redis-Insight-linux-arm64.deb"
58+
# "Redis-Insight-linux-x86_64.rpm"
59+
# "Redis-Insight-linux-aarch64.rpm"
60+
# "Redis-Insight-linux-amd64.snap"
61+
)
62+
63+
FILES=()
64+
for pattern in "${PATTERNS[@]}"; do
65+
match=$(find ./release -name "$pattern" -type f 2>/dev/null | head -n 1)
66+
if [ -n "$match" ]; then
67+
FILES+=("$match")
68+
echo "Found: $match"
69+
else
70+
echo "::warning::Installer not found: $pattern"
71+
fi
72+
done
73+
74+
if [ ${#FILES[@]} -eq 0 ]; then
75+
echo "::warning::No desktop installers matched. Nothing to upload."
76+
exit 0
77+
fi
78+
79+
echo "Uploading ${#FILES[@]} file(s) to release '${TAG}'..."
80+
gh release upload "$TAG" "${FILES[@]}" --clobber
81+
echo "Upload complete."

.github/workflows/release-prod.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ jobs:
3737
needs: virustotal-prod
3838
secrets: inherit
3939

40-
publish-stores:
41-
name: Publish to stores
42-
uses: ./.github/workflows/publish-stores.yml
43-
needs: aws-upload-prod
44-
secrets: inherit
40+
# publish-stores:
41+
# name: Publish to stores
42+
# uses: ./.github/workflows/publish-stores.yml
43+
# needs: aws-upload-prod
44+
# secrets: inherit
4545

4646
# Remove artifacts from github actions
4747
remove-artifacts:

0 commit comments

Comments
 (0)