-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.63 KB
/
Copy pathrelease-sdk-react-native.yml
File metadata and controls
48 lines (40 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release React Native SDK
# Triggered by version tags: v1.2.3
on:
push:
tags: ["v*.*.*"]
# The React Native SDK ships JS + C++/Rust source files to npm.
# Native compilation (JSI .so / .a) happens inside the consuming app's
# Xcode / Gradle build via the included CMakeLists.txt / Podspec,
# so no cross-compilation matrix is required here.
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Set version from tag
working-directory: sdks/react-native
run: |
TAG="${{ github.ref_name }}"
VERSION="${TAG#v}"
npm version "$VERSION" --no-git-tag-version --allow-same-version
- name: Validate package integrity
working-directory: sdks/react-native
run: |
# Manually trigger bundling to ensure it works in CI environment
node scripts/bundle-rust.js
# Check for critical files that must be in the npm package
if [ ! -d "rust-core/src" ]; then echo "Error: rust-core source missing!"; exit 1; fi
if [ ! -f "Checkgate.podspec" ]; then echo "Error: Podspec missing!"; exit 1; fi
if [ ! -d "android/src/main" ]; then echo "Error: Android configuration missing!"; exit 1; fi
echo "Package integrity verified."
- name: Publish @checkgate/react-native
working-directory: sdks/react-native
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}