From bd1f5ccfa3db029310a6e806a5fa9f29a9c04a92 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Tue, 24 Mar 2026 03:11:26 +0100 Subject: [PATCH 1/7] feat: update gh actions --- .github/PULL_REQUEST_TEMPLATE.md | 3 + .github/actions/setup/action.yml | 6 +- .github/workflows/ci.yml | 79 +++++++++++---------------- .github/workflows/publish-release.yml | 32 ++++++++--- 4 files changed, 63 insertions(+), 57 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4a5e0ac..72a00af 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -22,5 +22,8 @@ _Describe the PR shortly_ - [ ] `sdkVersion` property in logs is correct - [ ] `sdkPlatform` property in logs is correct +# dSYMs: +- [ ] attached + # Resolved issues _list of issues resolved by this PR_ diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8fe9e2e..8482cb3 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,11 +5,11 @@ runs: using: composite steps: - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: '20' + node-version: '24' node-version-file: .nvmrc - + - name: Upgrade npm for trusted publishing run: npm install -g npm@latest shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06e5e40..d0878d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup uses: ./.github/actions/setup @@ -31,25 +31,12 @@ jobs: - name: Format check run: yarn prettier --check - # no tests yet 😥 - # test: - # runs-on: ubuntu-latest - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - - # - name: Setup - # uses: ./.github/actions/setup - - # - name: Run unit tests - # run: yarn test --maxWorkers=2 --coverage - build-library: runs-on: ubuntu-latest needs: [lint] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup uses: ./.github/actions/setup @@ -62,23 +49,23 @@ jobs: needs: build-library steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup uses: ./.github/actions/setup - name: Install JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: - distribution: 'zulu' - java-version: '17' + distribution: "zulu" + java-version: "17" - name: Finalize Android SDK run: | /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" - name: Cache Gradle - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ~/.gradle/wrapper @@ -95,30 +82,28 @@ jobs: yarn build:android # !! Currently build iOS is not working due to issues with XCode version - # build-ios: - # runs-on: macos-14 - # needs: build-library - - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - - # - name: Setup Xcode version - # uses: maxim-lobanov/setup-xcode@v1.6.0 - # with: - # xcode-version: '15.4.0' - - - - # - name: Setup - # uses: ./.github/actions/setup - - # - name: Install cocoapods - # run: | - # cd example/ios - # pod install - - # - name: Build example for iOS - # working-directory: ./example - # run: | - # yarn build:ios +# build-ios: +# runs-on: macos-14 +# needs: build-library + +# steps: +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: Setup Xcode version +# uses: maxim-lobanov/setup-xcode@v1.6.0 +# with: +# xcode-version: '15.4.0' + +# - name: Setup +# uses: ./.github/actions/setup + +# - name: Install cocoapods +# run: | +# cd example/ios +# pod install + +# - name: Build example for iOS +# working-directory: ./example +# run: | +# yarn build:ios diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 47ba6f8..ba5ab83 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup uses: ./.github/actions/setup @@ -36,19 +36,37 @@ jobs: - name: Get latest version run: echo "PACKAGE_VERSION=$(node scripts/extract_version.js)" >> $GITHUB_ENV + - name: Download dSYMs + env: + PR_BODY: ${{ github.event.pull_request.body }} + run: | + url=$(echo "$PR_BODY" | grep -oE 'https://[^ )]*dSYMs\.zip' | head -n 1) + if [ -n "$url" ]; then + echo "Found dSYMs URL: $url" + curl -L -o dSYMs.zip "$url" + else + echo "No dSYMs.zip URL found in PR body." + fi + - name: GitHub Release - uses: softprops/action-gh-release@v2 - with: - name: freeRASP ${{ env.PACKAGE_VERSION }} - tag_name: v${{ env.PACKAGE_VERSION }} - body_path: ${{ github.workspace }}-CURRENT_CHANGELOG.md + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + FILES="" + if [ -f dSYMs.zip ]; then + FILES="dSYMs.zip" + fi + gh release create v${{ env.PACKAGE_VERSION }} \ + --title "freeRASP ${{ env.PACKAGE_VERSION }}" \ + --notes-file ${{ github.workspace }}-CURRENT_CHANGELOG.md \ + $FILES publish_npmjs: name: Publish release to npm.js needs: release_gh runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup uses: ./.github/actions/setup From d7c3ea52c4b8628788c1f527b4e592eea4bf91e0 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Tue, 24 Mar 2026 16:04:48 +0100 Subject: [PATCH 2/7] add ios build --- .github/workflows/ci.yml | 44 ++++++++++++++++------------------------ 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0878d5..25fd7cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,29 +81,21 @@ jobs: run: | yarn build:android -# !! Currently build iOS is not working due to issues with XCode version -# build-ios: -# runs-on: macos-14 -# needs: build-library - -# steps: -# - name: Checkout -# uses: actions/checkout@v4 - -# - name: Setup Xcode version -# uses: maxim-lobanov/setup-xcode@v1.6.0 -# with: -# xcode-version: '15.4.0' - -# - name: Setup -# uses: ./.github/actions/setup - -# - name: Install cocoapods -# run: | -# cd example/ios -# pod install - -# - name: Build example for iOS -# working-directory: ./example -# run: | -# yarn build:ios + build-ios: + runs-on: macos-latest + needs: build-library + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup + uses: ./.github/actions/setup + + - name: Install pods + working-directory: ./example + run: yarn pods + + - name: Build example for iOS + working-directory: ./example + run: | + yarn build:ios From ceebcfd1b0ee7ccb9d4d4172e8a6941c1a09bfd5 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Tue, 24 Mar 2026 16:24:39 +0100 Subject: [PATCH 3/7] update pod install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25fd7cc..02c7d9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,7 +93,7 @@ jobs: - name: Install pods working-directory: ./example - run: yarn pods + run: pod install - name: Build example for iOS working-directory: ./example From 09dc477f9d1407af46e5870e0e00a2c6801acf10 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Tue, 24 Mar 2026 16:29:45 +0100 Subject: [PATCH 4/7] fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02c7d9b..e5cd143 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: uses: ./.github/actions/setup - name: Install pods - working-directory: ./example + working-directory: ./example/ios run: pod install - name: Build example for iOS From b0851a266f84ba28e2da55a2838dc09faccfa4cc Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Wed, 25 Mar 2026 02:22:35 +0100 Subject: [PATCH 5/7] fix script --- example/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/package.json b/example/package.json index 795558c..f29e3b4 100644 --- a/example/package.json +++ b/example/package.json @@ -8,7 +8,7 @@ "start": "react-native start", "pods": "pod-install --quiet", "build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", - "build:ios": "cd ios && xcodebuild -workspace FreeraspReactNativeExample.xcworkspace -scheme FreeraspReactNativeExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO" + "build:ios": "cd ios && xcodebuild -workspace FreeraspRNExample.xcworkspace -scheme FreeraspRNExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO" }, "dependencies": { "@react-native-material/core": "^1.3.7", From 250a84cbedb6e07b6dd3e301c0bc7f7e17964c72 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Wed, 25 Mar 2026 04:19:04 +0100 Subject: [PATCH 6/7] fix --- .github/actions/setup/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 8482cb3..6b80e88 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -8,7 +8,6 @@ runs: uses: actions/setup-node@v6 with: node-version: '24' - node-version-file: .nvmrc - name: Upgrade npm for trusted publishing run: npm install -g npm@latest From 6a686864774a388e2ad5f6e93221cf7b7f9a77b9 Mon Sep 17 00:00:00 2001 From: Tomas Psota Date: Wed, 25 Mar 2026 11:28:28 +0100 Subject: [PATCH 7/7] remove example from npm --- .npmignore | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.npmignore b/.npmignore index 93407b7..818eef4 100644 --- a/.npmignore +++ b/.npmignore @@ -48,14 +48,6 @@ local.properties android.iml **/android/**/build -# Cocoapods -# -example/ios/Pods -example/ios/Podfile.lock - -# Ruby -example/vendor/ - # node.js # node_modules/ @@ -89,11 +81,6 @@ babel.config.js CONTRIBUTING.md CODE_OF_CONDUCT.md ci-template.ejs -example/node_modules -example.yarn.lock -example/ios/build -example/ios/Pods -example/ios/podfile.lock lib/typescript/example ios/build android/build @@ -101,10 +88,9 @@ android/gradle android/gradlew android/gradlew.bat android/local.properties -example/android/build -example/android/app/build -example/android/local.properties **/__tests__/ **/__fixtures__/* **/__mocks__/* **/.* + +example/