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
114 changes: 70 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,35 @@ concurrency:

jobs:

security:
runs-on: ubuntu-latest
name: Security & Dependency Review
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Dependency Review
uses: actions/dependency-review-action@v4
if: github.event_name == 'pull_request'
with:
fail-on-severity: moderate

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run npm audit
run: npm audit --audit-level=moderate
continue-on-error: true

install-dep:
runs-on: macos-latest
env:
NO_FLIPPER: '1'
name: Install dependencies
steps:
- name: Checkout the code
Expand All @@ -26,7 +53,7 @@ jobs:
!*.MD
!*.yml

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache node_modules
id: cache-node-modules
if: steps.verify-dev-changed-files.outputs.any_changed == 'true'
Expand All @@ -35,19 +62,21 @@ jobs:
node_modules
example/node_modules
key: ${{ runner.os }}-nodeModules-${{ hashFiles('package.json') }}-${{ hashFiles('example/package.json') }}
restore-keys: |
${{ runner.os }}-nodeModules-

- name: Set up Ruby
if: steps.verify-dev-changed-files.outputs.any_changed == 'true'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: '3.2'
bundler-cache: true

- name: Setup node
if: steps.verify-dev-changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: Install npm dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true' && steps.verify-dev-changed-files.outputs.any_changed == 'true'
Expand Down Expand Up @@ -80,18 +109,19 @@ jobs:
!example/ios/**
example/e2e/**

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache node_modules
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
id: cache-node-modules
with:
path: |
node_modules
example/node_modules
fail-on-cache-miss: true
key: ${{ runner.os }}-nodeModules-${{ hashFiles('package.json') }}-${{ hashFiles('example/package.json') }}
restore-keys: |
${{ runner.os }}-nodeModules-

- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache-gradle
name: Cache Gradle dependencies
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
Expand All @@ -100,22 +130,17 @@ jobs:
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('android/src/**/*.kt') }}

- name: Set up Ruby
uses: ruby/setup-ruby@v1
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
with:
ruby-version: 2.7
bundler-cache: true
restore-keys: |
${{ runner.os }}-gradle-

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
with:
node-version: '18'
node-version: '20'

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
with:
distribution: 'zulu'
Expand Down Expand Up @@ -149,7 +174,7 @@ jobs:
path: ${{ github.workspace }}/example/android/app-release-${{ github.sha }}.apk

android-api-level-test:
runs-on: macos-latest
runs-on: macos-13
needs: android-build
name: Android Test
strategy:
Expand All @@ -172,43 +197,38 @@ jobs:
!example/ios/**
example/e2e/**

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache node_modules
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
id: cache-node-modules
with:
path: |
node_modules
example/node_modules
fail-on-cache-miss: true
key: ${{ runner.os }}-nodeModules-${{ hashFiles('package.json') }}-${{ hashFiles('example/package.json') }}
restore-keys: |
${{ runner.os }}-nodeModules-

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache Gradle dependencies
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
id: cache-gradle
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
fail-on-cache-miss: true
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('android/src/**/*.kt') }}

- name: Set up Ruby
uses: ruby/setup-ruby@v1
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
with:
ruby-version: 2.7
bundler-cache: true
restore-keys: |
${{ runner.os }}-gradle-

- name: Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
with:
node-version: '18'
node-version: '20'

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
if: steps.verify-android-changed-files.outputs.any_changed == 'true'
with:
distribution: 'zulu'
Expand All @@ -220,7 +240,7 @@ jobs:
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: arm64-v8a
arch: x86_64
profile: pixel_5
script: |
cd example/android && ./gradlew connectedCheck --stacktrace
Expand All @@ -234,11 +254,13 @@ jobs:

ios-build-test:
runs-on: macos-latest
env:
NO_FLIPPER: '1'
needs: install-dep
name: iOS Build and Test
strategy:
matrix:
cocoapods: ['1.10.1', '1.14.3']
cocoapods: ['1.14.3', '1.15.0']
steps:
- name: Checkout the code
uses: actions/checkout@v4
Expand All @@ -255,7 +277,7 @@ jobs:
!example/android/**
example/e2e/**

- uses: actions/cache@v3
- uses: actions/cache@v4
name: Cache node_modules
id: cache-node-modules
if: steps.verify-iOS-changed-files.outputs.any_changed == 'true'
Expand All @@ -264,21 +286,25 @@ jobs:
node_modules
example/node_modules
key: ${{ runner.os }}-nodeModules-${{ hashFiles('package.json') }}-${{ hashFiles('example/package.json') }}
fail-on-cache-miss: true
restore-keys: |
${{ runner.os }}-nodeModules-

- name: Cache Pods
id: cache-pods
uses: actions/cache@v3
uses: actions/cache@v4
if: steps.verify-iOS-changed-files.outputs.any_changed == 'true'
with:
path: example/ios/Pods
key: ${{ runner.os }}-pods-${{ matrix.cocoapods }}-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-${{ matrix.cocoapods }}-
${{ runner.os }}-pods-

- name: Set up Ruby
uses: ruby/setup-ruby@v1
if: steps.verify-iOS-changed-files.outputs.any_changed == 'true'
with:
ruby-version: 2.7
ruby-version: '3.2'
bundler-cache: true

- name: Install Cocoapods
Expand All @@ -287,9 +313,9 @@ jobs:

- name: Setup node
if: steps.verify-iOS-changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- name: Install Pods
if: steps.cache-pods.outputs.cache-hit != 'true' && steps.verify-iOS-changed-files.outputs.any_changed == 'true'
Expand All @@ -306,21 +332,21 @@ jobs:
if: steps.verify-iOS-changed-files.outputs.any_changed == 'true'
run: |
cd example/ios
xcodebuild -workspace ImageMarkerExample.xcworkspace -scheme ImageMarkerExample -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' | xcpretty
xcodebuild -workspace ImageMarkerExample.xcworkspace -scheme ImageMarkerExample -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' | xcpretty

- name: Test
if: steps.verify-iOS-changed-files.outputs.any_changed == 'true'
run: |
cd example/ios
xcodebuild -workspace ImageMarkerExample.xcworkspace -scheme ImageMarkerExample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12' test | xcpretty
xcodebuild -workspace ImageMarkerExample.xcworkspace -scheme ImageMarkerExample -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' test | xcpretty

ci-complete:
name: Complete CI
needs: [android-build, android-api-level-test, ios-build-test]
needs: [security, android-build, android-api-level-test, ios-build-test]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check all job status
if: >-
${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# Changelog

## [1.2.7](///compare/v1.1.8...v1.2.7) (2025-11-20)

### Features

* expo support ([#207](undefined/undefined/undefined/issues/207)) 7a6ca14

### Bug Fixes

* fix [#158](undefined/undefined/undefined/issues/158) android release bug style not working ([#160](undefined/undefined/undefined/issues/160)) a942e30
* fontName bug (android) ([#196](undefined/undefined/undefined/issues/196)) 83d9856
* add custom fonts to example ([#197](undefined/undefined/undefined/issues/197)) 6e2ad75
* coil load image with original size ([#217](undefined/undefined/undefined/issues/217)) d6e8744
* fix [#164](undefined/undefined/undefined/issues/164) Build Failure on CI Due to CocoaPods 1.1.9 in iOS Project ([#165](undefined/undefined/undefined/issues/165)) 532e8a4
* fix [#179](undefined/undefined/undefined/issues/179) Same watermark image is behaving differently on ANDROID and iOS ([#180](undefined/undefined/undefined/issues/180)) 10d71e1
* fix [#179](undefined/undefined/undefined/issues/179) same watermark image is behaving differently on android and ios when use given position enum ([#187](undefined/undefined/undefined/issues/187)) 1c62250
* fix [#202](undefined/undefined/undefined/issues/202) generates inconsistent text size across different devices ([#204](undefined/undefined/undefined/issues/204)) 47c0cd9
* fix[#176](undefined/undefined/undefined/issues/176) Fresco 3.1.3 compatibility issues with RN 0.73.0, compileDebugKotlin FAILED ([#177](undefined/undefined/undefined/issues/177)) 06d65c4
* Handle Nullable Map and Enum Mismatch in MarkTextOptions.kt ([#247](undefined/undefined/undefined/issues/247)) 9878efa
* load base64 image on android ([#240](undefined/undefined/undefined/issues/240)) 4764a6f
* parse hex color string crash on iOS ([#186](undefined/undefined/undefined/issues/186)) 53ac1f1
* RN 0.80.2 build error ([#248](undefined/undefined/undefined/issues/248)) 76d6972

## [1.2.6](https://github.com/JimmyDaddy/react-native-image-marker/compare/v1.1.8...v1.2.6) (2024-02-04)

Expand Down
16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-image-marker",
"version": "1.2.6",
"version": "1.2.7",
"description": "Add text or icon watermark to your images",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down Expand Up @@ -66,11 +66,12 @@
"@evilmartians/lefthook": "^1.2.2",
"@expo/config-plugins": "^7.8.4",
"@react-native-community/eslint-config": "^3.0.2",
"@release-it/conventional-changelog": "^7.0.2",
"@release-it/conventional-changelog": "^10.0.2",
"@types/jest": "^28.1.2",
"@types/react": "~17.0.21",
"@types/react-native": "0.70.0",
"commitlint": "^17.0.2",
"conventional-changelog-conventionalcommits": "^9.1.0",
"del-cli": "^5.0.0",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -83,7 +84,7 @@
"react": "18.2.0",
"react-native": "0.73.3",
"react-native-builder-bob": "^0.20.0",
"release-it": "^16.2.0",
"release-it": "^19.0.6",
"typedoc": "^0.24.8",
"typedoc-plugin-localization": "^3.0.1",
"typedoc-plugin-rename-defaults": "^0.6.5",
Expand Down Expand Up @@ -114,7 +115,8 @@
"release-it": {
"git": {
"commitMessage": "chore: release ${version}",
"tagName": "v${version}"
"tagName": "v${version}",
"changelog": "grep '^## ' CHANGELOG.md | head -n 1"
},
"npm": {
"publish": false
Expand All @@ -124,8 +126,10 @@
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md"
"preset": "conventionalcommits",
"infile": "CHANGELOG.md",
"header": "# Changelog",
"releaseCount": 0
}
}
},
Expand Down
Loading