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
14 changes: 14 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changesets

Every pull request must include a changeset.

Use `yarn changeset` for a consumer-facing change to
`@polygonlabs/oms-wallet-react-native`. Choose the SemVer bump that matches the public impact and
write a user-facing summary.

Use `yarn changeset add --empty` for documentation, CI, tooling, or example-only changes that do
not change the published package.

The automated release workflow consumes changesets, updates the root package version and
`CHANGELOG.md`, publishes through npm trusted publishing, and creates the `v<version>` tag and
GitHub Release.
20 changes: 20 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.5/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "0xPolygon/oms-wallet-react-native-sdk"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"bumpVersionsWithWorkspaceProtocolOnly": false,
"privatePackages": {
"version": false,
"tag": false
}
}
5 changes: 5 additions & 0 deletions .changeset/governance-release-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@polygonlabs/oms-wallet-react-native': patch
---

Declare the package module type, supported Node.js engines, and tree-shaking metadata.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @0xPolygon/product-applications
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request 💡
url: https://github.com/0xsequence/react-native-sdk/discussions/new?category=ideas
about: If you have a feature request, please create a new discussion on GitHub.
url: https://github.com/0xPolygon/oms-wallet-react-native-sdk/issues/new
about: If you have a feature request, please open an issue on GitHub.
- name: Discussions on GitHub 💬
url: https://github.com/0xsequence/react-native-sdk/discussions
about: If this library works as promised but you need help, please ask questions there.
url: https://github.com/0xPolygon/oms-wallet-react-native-sdk/issues
about: If this library works as promised but you need help, please open an issue.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- [ ] `yarn lint` passes
- [ ] `yarn typecheck` passes
- [ ] `yarn prepare` (library build) succeeds
- [ ] A user-facing or empty changeset is included
- [ ] Native layer unchanged **or** manually verified on device/simulator
- [ ] `API.md` updated if public exports changed

Expand Down
17 changes: 12 additions & 5 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: Setup
description: Setup Node.js and install dependencies

inputs:
cache-dependencies:
description: Restore and save the node_modules cache
required: false
default: 'true'

runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version-file: .nvmrc

Expand All @@ -14,8 +20,9 @@ runs:
shell: bash

- name: Restore dependencies
if: inputs.cache-dependencies == 'true'
id: yarn-cache
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5
with:
path: |
**/node_modules
Expand All @@ -26,13 +33,13 @@ runs:
${{ runner.os }}-yarn-

- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
if: inputs.cache-dependencies != 'true' || steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash

- name: Cache dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
if: inputs.cache-dependencies == 'true' && steps.yarn-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5
with:
path: |
**/node_modules
Expand Down
38 changes: 38 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,41 @@ updates:
labels:
- dependencies
- ci

# Ruby and CocoaPods tooling for the bare React Native examples
- package-ecosystem: bundler
directory: /examples/sdk-example
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
labels:
- dependencies

- package-ecosystem: bundler
directory: /examples/trails-actions-example
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
labels:
- dependencies

# Gradle wrappers and example build tooling. Native OMS SDK pins remain coordinated manually.
- package-ecosystem: gradle
directory: /examples/sdk-example/android
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
labels:
- dependencies

- package-ecosystem: gradle
directory: /examples/trails-actions-example/android
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
labels:
- dependencies
25 changes: 25 additions & 0 deletions .github/workflows/changeset-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Changeset check

on:
pull_request:
branches: [master]

permissions:
contents: read

jobs:
check:
name: Require changeset
if: "!startsWith(github.head_ref, 'changeset-release/')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Check changesets
env:
BASE_REF: ${{ github.base_ref }}
run: yarn changeset status --since="origin/$BASE_REF"
170 changes: 5 additions & 165 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,177 +1,17 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches: [master]
workflow_dispatch:
Comment thread
tolgahan-arikan marked this conversation as resolved.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
verify:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup
uses: ./.github/actions/setup

- name: Install Expo example dependencies
run: yarn expo-example:install

- name: Verify SDK
run: yarn verify

- name: Typecheck Expo example
run: npm --prefix examples/expo-example run typecheck

- name: Prebuild and verify Expo native autolinking
run: yarn expo-example:prebuild && yarn expo-example:verify-autolinking


build-library:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup
uses: ./.github/actions/setup

- name: Build package
run: yarn prepare

build-android:
runs-on: ubuntu-latest

env:
ANDROID_NDK_VERSION: 27.1.12297006
TURBO_CACHE_DIR: .turbo/android

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for Android
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-android-

- name: Check turborepo cache for Android
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --filter=oms-client-react-native-sdk-example --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")

if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi

- name: Install JDK
if: env.turbo_cache_hit != '1'
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: 'zulu'
java-version: '17'

- name: Finalize Android SDK
if: env.turbo_cache_hit != '1'
run: |
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
for attempt in 1 2 3; do
if "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;$ANDROID_NDK_VERSION"; then
exit 0
fi

rm -rf "$ANDROID_HOME/ndk/$ANDROID_NDK_VERSION" "$ANDROID_HOME/.temp"
sleep 10
done

exit 1


- name: Cache Gradle
if: env.turbo_cache_hit != '1'
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('examples/sdk-example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build example for Android
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: |
yarn turbo run build:android --filter=oms-client-react-native-sdk-example --cache-dir="${{ env.TURBO_CACHE_DIR }}"

build-ios:
runs-on: macos-latest

env:
XCODE_VERSION: 26
TURBO_CACHE_DIR: .turbo/ios
RCT_USE_RN_DEP: 1
RCT_USE_PREBUILT_RNCORE: 1

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for iOS
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-turborepo-ios-

- name: Check turborepo cache for iOS
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --filter=oms-client-react-native-sdk-example --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")

if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi

- name: Use appropriate Xcode version
if: env.turbo_cache_hit != '1'
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: ${{ env.XCODE_VERSION }}

- name: Setup Ruby
if: env.turbo_cache_hit != '1'
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
with:
ruby-version: '3.4.9'

- name: Install cocoapods
if: env.turbo_cache_hit != '1'
run: |
cd examples/sdk-example
bundle install
bundle exec pod repo update --verbose
bundle exec pod install --project-directory=ios

- name: Build example for iOS
run: |
yarn turbo run build:ios --filter=oms-client-react-native-sdk-example --cache-dir="${{ env.TURBO_CACHE_DIR }}"
verification:
uses: ./.github/workflows/verification.yml
18 changes: 18 additions & 0 deletions .github/workflows/claude-code-review-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]

permissions:
contents: read
pull-requests: write
issues: read
id-token: write
actions: read

jobs:
claude-review:
uses: 0xPolygon/pipelines/.github/workflows/apps-claude-code-review.yml@main
secrets:
CLAUDE_API_KEY: ${{ secrets.CLAUDE_API_KEY }}
Loading
Loading