Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/sample-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,39 @@ jobs:
env:
ANDROID_FIREBASE_APP_ID: ${{ secrets.ANDROID_FIREBASE_APP_ID }}
FIREBASE_CREDENTIALS_JSON: ${{ secrets.FIREBASE_CREDENTIALS_JSON }}
# Publish the same APK to S3 for the public download link. Reuses the
# artifact the Fastlane step above already built (app-build/), no rebuild.
- name: Ensure AWS CLI is available
if: github.ref == 'refs/heads/develop'
# The self-hosted `public` runner does not ship the AWS CLI. Install v2
# only when missing, to a user-writable dir (no sudo), then expose it.
run: |
if command -v aws >/dev/null 2>&1; then
echo "AWS CLI already installed: $(aws --version)"
exit 0
fi
echo "AWS CLI not found; installing v2..."
case "$(uname -m)" in
x86_64) zip="awscli-exe-linux-x86_64.zip" ;;
aarch64|arm64) zip="awscli-exe-linux-aarch64.zip" ;;
*) echo "Unsupported architecture: $(uname -m)"; exit 1 ;;
esac
curl -fsSL "https://awscli.amazonaws.com/${zip}" -o /tmp/awscliv2.zip
unzip -q /tmp/awscliv2.zip -d /tmp
/tmp/aws/install --bin-dir "$HOME/.local/bin" --install-dir "$HOME/.local/aws-cli" --update
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
"$HOME/.local/bin/aws" --version
- name: Configure AWS credentials
if: github.ref == 'refs/heads/develop'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload APK to S3
if: github.ref == 'refs/heads/develop'
working-directory: examples/SampleApp
# Public download link: https://getstream.io/downloads/rn-sample-app.apk
run: |
cp app-build/reactnativesampleapp.apk rn-sample-app.apk
aws s3 cp rn-sample-app.apk s3://${{ secrets.AWS_S3_BUCKET }} --sse AES256
57 changes: 41 additions & 16 deletions examples/SampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,7 @@ PODS:
- ReactNativeDependencies
- RNFBApp
- Yoga
- RNGestureHandler (2.31.2):
- RNGestureHandler (3.0.2):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -2526,7 +2526,7 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- RNReanimated (4.3.1):
- RNReanimated (4.5.1):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand All @@ -2548,11 +2548,12 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- RNReanimated/apple (= 4.3.1)
- RNReanimated/common (= 4.3.1)
- RNReanimated/apple (= 4.5.1)
- RNReanimated/common (= 4.5.1)
- RNReanimated/view (= 4.5.1)
- RNWorklets
- Yoga
- RNReanimated/apple (4.3.1):
- RNReanimated/apple (4.5.1):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand All @@ -2576,7 +2577,31 @@ PODS:
- ReactNativeDependencies
- RNWorklets
- Yoga
- RNReanimated/common (4.3.1):
- RNReanimated/common (4.5.1):
- hermes-engine
- RCTRequired
- RCTTypeSafety
- React-Core
- React-Core-prebuilt
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- RNWorklets
- Yoga
- RNReanimated/view (4.5.1):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -2714,7 +2739,7 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- RNWorklets (0.8.3):
- RNWorklets (0.10.2):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand All @@ -2736,10 +2761,10 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- RNWorklets/apple (= 0.8.3)
- RNWorklets/common (= 0.8.3)
- RNWorklets/apple (= 0.10.2)
- RNWorklets/common (= 0.10.2)
- Yoga
- RNWorklets/apple (0.8.3):
- RNWorklets/apple (0.10.2):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand All @@ -2762,7 +2787,7 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- RNWorklets/common (0.8.3):
- RNWorklets/common (0.10.2):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -2796,7 +2821,7 @@ PODS:
- SDWebImageWebPCoder (0.15.0):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.17)
- stream-chat-react-native (8.1.0):
- stream-chat-react-native (9.6.1):
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand Down Expand Up @@ -3322,19 +3347,19 @@ SPEC CHECKSUMS:
RNFastImage: 14580cef91660b889645fb9e87f58a53621db993
RNFBApp: 3b942e786ca88524ba17df665a1a360fb3eee525
RNFBMessaging: b82ba0933288d710f5371f57d3115092abf64903
RNGestureHandler: a97cc64efbfcb7a53969a38310a189a3d5246c65
RNGestureHandler: 795970e76a4f4bcef87e77c12c5c791d86574ab6
RNNotifee: 5e3b271e8ea7456a36eec994085543c9adca9168
RNReactNativeHapticFeedback: 9dc72312c12cb53ee240b5b7aae1e167f3d940a6
RNReanimated: 8aac6baab55e39ca4e02afd69f77fb127b26520c
RNReanimated: e9815897227d24f4629b1ca467cf5f26bffdc7eb
RNScreens: 8d318eb8905fa1d3439a1ce5d567f82ae8245657
RNShare: 26c9524aee8cc3eedbab6d6b98cacce2f5247893
RNSVG: 8efa5ad14ceb98fe56c03793bd55bc4bd30ad84b
RNWorklets: 4931990f73bc8f347586918b2e13f11dfadf3b75
RNWorklets: 53439575fed8525fb8d1cabcc05a3d4d91e6ffe4
SDWebImage: e9fc87c1aab89a8ab1bbd74eba378c6f53be8abf
SDWebImageAVIFCoder: afe194a084e851f70228e4be35ef651df0fc5c57
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SDWebImageWebPCoder: 0e06e365080397465cc73a7a9b472d8a3bd0f377
stream-chat-react-native: eedc4ebe706de6e9bfbcf943599b4e62bad6079f
stream-chat-react-native: fdb9929071f737e85eee5b8dbdb6bc4e120ac5c4
Teleport: 58dccc8594d74a77cdc2a2191b60656f9aaac743
Yoga: e240fec777ff1f21ef42ccebbb44b6d262125855

Expand Down
6 changes: 3 additions & 3 deletions examples/SampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@
"react": "19.2.3",
"react-native": "0.85.3",
"react-native-blob-util": "^0.24.9",
"react-native-gesture-handler": "^2.31.2",
"react-native-gesture-handler": "^3.0.2",
"react-native-haptic-feedback": "^3.0.0",
"react-native-image-picker": "^8.2.1",
"react-native-maps": "^1.27.2",
"react-native-nitro-modules": "0.31.3",
"react-native-nitro-sound": "0.2.9",
"react-native-reanimated": "4.3.1",
"react-native-reanimated": "4.5.1",
"react-native-safe-area-context": "^5.8.0",
"react-native-screens": "^4.25.2",
"react-native-share": "^12.3.1",
"react-native-svg": "^15.15.5",
"react-native-teleport": "^1.1.7",
"react-native-video": "^6.19.2",
"react-native-worklets": "^0.8.3",
"react-native-worklets": "^0.10.2",
"stream-chat": "^9.50.1",
"stream-chat-react-native": "workspace:^",
"stream-chat-react-native-core": "workspace:^"
Expand Down
15 changes: 11 additions & 4 deletions package/bin/before-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,22 @@ set -eux
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
PACKAGE_VERSION_WITHOUT_SHA=$(echo "$PACKAGE_VERSION" | cut -d"+" -f1)

# We bump ONLY the `version` field of the internal packages here and deliberately leave their
# `stream-chat-react-native-core` dependency as `workspace:^`. This script runs during
# semantic-release's *prepare* step, before the release commit + `git push origin main` (see
# `release/prod.js`), so whatever these files look like on disk here is what gets committed.
#
# Bumping `version` is safe to commit: Yarn resolves workspace packages to a `0.0.0-use.local`
# placeholder in the lockfile and keys on the `workspace:^` descriptor, so the version field
# never affects yarn.lock. Resolving `workspace:^` to a concrete version, however, WOULD change
# the lockfile descriptor and break `yarn install --immutable` and local workspace linking.
# That resolution is therefore done only in the published npm tarball, at publish time, in
# `release.sh` (which runs after this commit) and is never committed back to git.
cd native-package
npm version --no-workspaces --allow-same-version --no-git-tag-version "$PACKAGE_VERSION_WITHOUT_SHA"
sed -e 's|"stream-chat-react-native-core": "[^"]*"|"stream-chat-react-native-core": "'"$PACKAGE_VERSION_WITHOUT_SHA"'"|g' -i.bak package.json
rm package.json.bak

cd ../expo-package
npm version --no-workspaces --allow-same-version --no-git-tag-version "$PACKAGE_VERSION_WITHOUT_SHA"
sed -e 's|"stream-chat-react-native-core": "[^"]*"|"stream-chat-react-native-core": "'"$PACKAGE_VERSION_WITHOUT_SHA"'"|g' -i.bak package.json
rm package.json.bak
cd ..

sed -e 's|"version": "[^"]*"|"version": "'"$PACKAGE_VERSION_WITHOUT_SHA"'"|g' -i.bak src/version.json
Expand Down
18 changes: 16 additions & 2 deletions package/bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,35 @@
set -eux

PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]')
PACKAGE_VERSION_WITHOUT_SHA=$(echo "$PACKAGE_VERSION" | cut -d"+" -f1)
PACKAGE_TAG=$(sed 's/.*-\(.*\)\..*/\1/' <<< "$PACKAGE_VERSION")

# Resolve the `workspace:^` protocol to the concrete published version. npm cannot understand
# Yarn's `workspace:` protocol, so the tarball must carry a real version. We do this ONLY here,
# at publish time as this runs after `semantic-release` has already committed and pushed the release
# commit (see release/prod.js), on a throwaway CI checkout, so the rewrite is never committed.
# That keeps `workspace:^` intact in git for local dev and `yarn install --immutable`, while the
# published packages still depend on a concrete `stream-chat-react-native-core` version.
resolve_workspace_dep() {
sed -e 's|"stream-chat-react-native-core": "[^"]*"|"stream-chat-react-native-core": "'"$PACKAGE_VERSION_WITHOUT_SHA"'"|g' -i.bak package.json
rm package.json.bak
}

# If tag === version it means that its not a prerelease and shouuld set things to latest
if [[ "${PACKAGE_TAG}" != "${PACKAGE_VERSION}" ]]; then
cd native-package
resolve_workspace_dep
npm publish --no-workspaces --tag="$PACKAGE_TAG"

cd ../expo-package
resolve_workspace_dep
npm publish --no-workspaces --tag="$PACKAGE_TAG"
else
cd native-package
resolve_workspace_dep
npm publish --no-workspaces

cd ../expo-package
resolve_workspace_dep
npm publish --no-workspaces
fi


2 changes: 1 addition & 1 deletion package/expo-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"types": "types/index.d.ts",
"dependencies": {
"mime": "^4.0.7",
"stream-chat-react-native-core": "9.6.1"
"stream-chat-react-native-core": "workspace:^"
},
"peerDependencies": {
"expo": ">=52.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package/native-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dependencies": {
"es6-symbol": "^3.1.3",
"mime": "^4.0.7",
"stream-chat-react-native-core": "9.6.1"
"stream-chat-react-native-core": "workspace:^"
},
"peerDependencies": {
"@react-native-camera-roll/camera-roll": ">=7.9.0",
Expand Down
8 changes: 4 additions & 4 deletions package/src/components/Attachment/Audio/PlayPauseButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React, { useMemo } from 'react';
import { Pressable, PressableProps, StyleProp, StyleSheet, ViewStyle } from 'react-native';

import { useTheme } from '../../../contexts';
import { Pause } from '../../../icons/pause-fill';
import { Play } from '../../../icons/play-fill';
import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
import { primitives } from '../../../theme';
import { buttonSizes } from '../../ui/Button/constants';

Expand Down Expand Up @@ -31,6 +30,7 @@ export const PlayPauseButton = ({
const {
theme: { semantics },
} = useTheme();
const { icons } = useComponentsContext();
const styles = useStyles();
return (
<Pressable
Expand All @@ -45,9 +45,9 @@ export const PlayPauseButton = ({
{...rest}
>
{isPlaying ? (
<Pause fill={semantics.textSecondary} height={20} width={20} strokeWidth={1.5} />
<icons.Pause fill={semantics.textSecondary} height={20} width={20} strokeWidth={1.5} />
) : (
<Play fill={semantics.textSecondary} height={20} width={20} strokeWidth={1.5} />
<icons.Play fill={semantics.textSecondary} height={20} width={20} strokeWidth={1.5} />
)}
</Pressable>
);
Expand Down
Loading
Loading