Skip to content

Commit 59f5d2a

Browse files
authored
feat: update gh actions with node 24 (#146)
* feat: update gh actions * add ios build * update pod install * fix * fix script * fix * remove example from npm
1 parent 2cce5e5 commit 59f5d2a

File tree

6 files changed

+56
-73
lines changed

6 files changed

+56
-73
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@ _Describe the PR shortly_
2222
- [ ] `sdkVersion` property in logs is correct
2323
- [ ] `sdkPlatform` property in logs is correct
2424

25+
# dSYMs:
26+
- [ ] attached
27+
2528
# Resolved issues
2629
_list of issues resolved by this PR_

.github/actions/setup/action.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ runs:
55
using: composite
66
steps:
77
- name: Setup Node.js
8-
uses: actions/setup-node@v4
8+
uses: actions/setup-node@v6
99
with:
10-
node-version: '20'
11-
node-version-file: .nvmrc
12-
10+
node-version: '24'
11+
1312
- name: Upgrade npm for trusted publishing
1413
run: npm install -g npm@latest
1514
shell: bash

.github/workflows/ci.yml

Lines changed: 22 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Setup
1818
uses: ./.github/actions/setup
@@ -31,25 +31,12 @@ jobs:
3131
- name: Format check
3232
run: yarn prettier --check
3333

34-
# no tests yet 😥
35-
# test:
36-
# runs-on: ubuntu-latest
37-
# steps:
38-
# - name: Checkout
39-
# uses: actions/checkout@v4
40-
41-
# - name: Setup
42-
# uses: ./.github/actions/setup
43-
44-
# - name: Run unit tests
45-
# run: yarn test --maxWorkers=2 --coverage
46-
4734
build-library:
4835
runs-on: ubuntu-latest
4936
needs: [lint]
5037
steps:
5138
- name: Checkout
52-
uses: actions/checkout@v4
39+
uses: actions/checkout@v6
5340

5441
- name: Setup
5542
uses: ./.github/actions/setup
@@ -62,23 +49,23 @@ jobs:
6249
needs: build-library
6350
steps:
6451
- name: Checkout
65-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6
6653

6754
- name: Setup
6855
uses: ./.github/actions/setup
6956

7057
- name: Install JDK
71-
uses: actions/setup-java@v4
58+
uses: actions/setup-java@v5
7259
with:
73-
distribution: 'zulu'
74-
java-version: '17'
60+
distribution: "zulu"
61+
java-version: "17"
7562

7663
- name: Finalize Android SDK
7764
run: |
7865
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
7966
8067
- name: Cache Gradle
81-
uses: actions/cache@v4
68+
uses: actions/cache@v5
8269
with:
8370
path: |
8471
~/.gradle/wrapper
@@ -94,31 +81,21 @@ jobs:
9481
run: |
9582
yarn build:android
9683
97-
# !! Currently build iOS is not working due to issues with XCode version
98-
# build-ios:
99-
# runs-on: macos-14
100-
# needs: build-library
101-
102-
# steps:
103-
# - name: Checkout
104-
# uses: actions/checkout@v4
105-
106-
# - name: Setup Xcode version
107-
# uses: maxim-lobanov/setup-xcode@v1.6.0
108-
# with:
109-
# xcode-version: '15.4.0'
110-
111-
84+
build-ios:
85+
runs-on: macos-latest
86+
needs: build-library
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v6
11290

113-
# - name: Setup
114-
# uses: ./.github/actions/setup
91+
- name: Setup
92+
uses: ./.github/actions/setup
11593

116-
# - name: Install cocoapods
117-
# run: |
118-
# cd example/ios
119-
# pod install
94+
- name: Install pods
95+
working-directory: ./example/ios
96+
run: pod install
12097

121-
# - name: Build example for iOS
122-
# working-directory: ./example
123-
# run: |
124-
# yarn build:ios
98+
- name: Build example for iOS
99+
working-directory: ./example
100+
run: |
101+
yarn build:ios

.github/workflows/publish-release.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v6
2424

2525
- name: Setup
2626
uses: ./.github/actions/setup
@@ -36,19 +36,37 @@ jobs:
3636
- name: Get latest version
3737
run: echo "PACKAGE_VERSION=$(node scripts/extract_version.js)" >> $GITHUB_ENV
3838

39+
- name: Download dSYMs
40+
env:
41+
PR_BODY: ${{ github.event.pull_request.body }}
42+
run: |
43+
url=$(echo "$PR_BODY" | grep -oE 'https://[^ )]*dSYMs\.zip' | head -n 1)
44+
if [ -n "$url" ]; then
45+
echo "Found dSYMs URL: $url"
46+
curl -L -o dSYMs.zip "$url"
47+
else
48+
echo "No dSYMs.zip URL found in PR body."
49+
fi
50+
3951
- name: GitHub Release
40-
uses: softprops/action-gh-release@v2
41-
with:
42-
name: freeRASP ${{ env.PACKAGE_VERSION }}
43-
tag_name: v${{ env.PACKAGE_VERSION }}
44-
body_path: ${{ github.workspace }}-CURRENT_CHANGELOG.md
52+
env:
53+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: |
55+
FILES=""
56+
if [ -f dSYMs.zip ]; then
57+
FILES="dSYMs.zip"
58+
fi
59+
gh release create v${{ env.PACKAGE_VERSION }} \
60+
--title "freeRASP ${{ env.PACKAGE_VERSION }}" \
61+
--notes-file ${{ github.workspace }}-CURRENT_CHANGELOG.md \
62+
$FILES
4563
4664
publish_npmjs:
4765
name: Publish release to npm.js
4866
needs: release_gh
4967
runs-on: ubuntu-latest
5068
steps:
51-
- uses: actions/checkout@v4
69+
- uses: actions/checkout@v6
5270

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

.npmignore

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ local.properties
4848
android.iml
4949
**/android/**/build
5050

51-
# Cocoapods
52-
#
53-
example/ios/Pods
54-
example/ios/Podfile.lock
55-
56-
# Ruby
57-
example/vendor/
58-
5951
# node.js
6052
#
6153
node_modules/
@@ -89,22 +81,16 @@ babel.config.js
8981
CONTRIBUTING.md
9082
CODE_OF_CONDUCT.md
9183
ci-template.ejs
92-
example/node_modules
93-
example.yarn.lock
94-
example/ios/build
95-
example/ios/Pods
96-
example/ios/podfile.lock
9784
lib/typescript/example
9885
ios/build
9986
android/build
10087
android/gradle
10188
android/gradlew
10289
android/gradlew.bat
10390
android/local.properties
104-
example/android/build
105-
example/android/app/build
106-
example/android/local.properties
10791
**/__tests__/
10892
**/__fixtures__/*
10993
**/__mocks__/*
11094
**/.*
95+
96+
example/

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"start": "react-native start",
99
"pods": "pod-install --quiet",
1010
"build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
11-
"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"
11+
"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"
1212
},
1313
"dependencies": {
1414
"@react-native-material/core": "^1.3.7",

0 commit comments

Comments
 (0)