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..6b80e88 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -5,11 +5,10 @@ runs: using: composite steps: - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: - node-version: '20' - node-version-file: .nvmrc - + node-version: '24' + - 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..e5cd143 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 @@ -94,31 +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' - - + build-ios: + runs-on: macos-latest + needs: build-library + steps: + - name: Checkout + uses: actions/checkout@v6 - # - name: Setup - # uses: ./.github/actions/setup + - name: Setup + uses: ./.github/actions/setup - # - name: Install cocoapods - # run: | - # cd example/ios - # pod install + - name: Install pods + working-directory: ./example/ios + run: pod install - # - name: Build example for iOS - # working-directory: ./example - # run: | - # yarn build:ios + - 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 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/ 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",