From fa241534e75dde38a5a49bb8a47dfddd9c995cb0 Mon Sep 17 00:00:00 2001 From: tafilovic Date: Wed, 11 Mar 2026 15:34:04 +0100 Subject: [PATCH 1/6] Updated deply script --- .github/workflows/publish-npm.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 18fcea0..3d73a1e 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -1,7 +1,12 @@ name: Publish to npm +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + on: push: + branches: + - deploy-actions tags: - 'v*' workflow_dispatch: @@ -38,5 +43,10 @@ jobs: - name: Build package run: yarn prepare + - name: Dry run publish (deploy-actions branch) + if: github.ref == 'refs/heads/deploy-actions' + run: npm publish --provenance --access public --dry-run + - name: Publish to npm + if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' run: npm publish --provenance --access public From c55aa8742fde7529cc064918d50a3c314718cd71 Mon Sep 17 00:00:00 2001 From: tafilovic Date: Wed, 11 Mar 2026 15:35:45 +0100 Subject: [PATCH 2/6] Changed install step from yarn install --immutable to yarn install --- .github/workflows/publish-npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 3d73a1e..e0a3139 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -32,7 +32,7 @@ jobs: run: corepack enable - name: Install dependencies - run: yarn install --immutable + run: yarn install - name: Typecheck run: yarn typecheck From 7e33ba6857396afb12dea03f8f84fc6ff853545c Mon Sep 17 00:00:00 2001 From: tafilovic Date: Wed, 11 Mar 2026 15:37:00 +0100 Subject: [PATCH 3/6] =?UTF-8?q?Updated=20publish-npm.yml:yarn=20install=20?= =?UTF-8?q?=E2=86=92=20yarn=20install=20--no-immutable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-npm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index e0a3139..c8e88de 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -32,7 +32,7 @@ jobs: run: corepack enable - name: Install dependencies - run: yarn install + run: yarn install --no-immutable - name: Typecheck run: yarn typecheck From b5e80a4b9ad55fd73135eeb67c18b9921584c5ba Mon Sep 17 00:00:00 2001 From: tafilovic Date: Wed, 11 Mar 2026 15:40:30 +0100 Subject: [PATCH 4/6] Scope type checking to plugin code and fix example unused imports for CI stability. --- example/src/App.tsx | 1 - example/src/FetchExample.tsx | 2 +- package.json | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index f8c57f8..c1d972c 100755 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -19,7 +19,6 @@ import HomeScreen from './HomeScreen'; import { Routes } from './Routes'; import { MappIntelligencePlugin, - ExceptionType, LogLevel, } from 'mapp-intelligence-reactnative-plugin'; import FetchExample from './FetchExample'; diff --git a/example/src/FetchExample.tsx b/example/src/FetchExample.tsx index 0a07cea..6ec05eb 100644 --- a/example/src/FetchExample.tsx +++ b/example/src/FetchExample.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Alert, FlatList, SafeAreaView } from 'react-native'; +import { FlatList, SafeAreaView } from 'react-native'; import { DefaultStyles, Dialog, MappButton } from './components/MappComponents'; const FetchExample = ()=>{ diff --git a/package.json b/package.json index 858bee5..4b838be 100755 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "example": "yarn workspace react-native-mappinteligence-plugin-example", "install:high-mem": "NODE_OPTIONS=--max-old-space-size=8192 yarn install", "test": "jest", - "typecheck": "tsc --noEmit", + "typecheck": "tsc --noEmit -p tsconfig.build.json", "lint": "eslint \"**/*.{js,ts,tsx}\"", "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib", "prepare": "bob build", From c46b8d77391fcef0eb13e4315cedf4edd2751f6c Mon Sep 17 00:00:00 2001 From: tafilovic Date: Wed, 11 Mar 2026 15:47:39 +0100 Subject: [PATCH 5/6] Updated plugin version 1.1.2 for release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b838be..daf5a1a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapp-intelligence-reactnative-plugin", - "version": "1.1.3", + "version": "1.1.2", "description": "The MappIntelligence SDK allows you to track user activities, screen flow and media usage for an App. All data is send to the MappIntelligence tracking system for further analysis.", "main": "lib/commonjs/index", "module": "lib/module/index", From 97bdfb1a6fa4fea56715016e3f6bb3c810142840 Mon Sep 17 00:00:00 2001 From: tafilovic Date: Wed, 11 Mar 2026 15:52:13 +0100 Subject: [PATCH 6/6] Make npm publish workflow manual-only with dry-run mode and auto version tag release. --- .github/workflows/publish-npm.yml | 63 ++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index c8e88de..93bce5e 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -4,18 +4,26 @@ env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true on: - push: - branches: - - deploy-actions - tags: - - 'v*' workflow_dispatch: + inputs: + deployment_mode: + description: 'Choose dry-run to validate or publish for real deployment.' + required: true + default: dry-run + type: choice + options: + - dry-run + - publish + tag: + description: "Optional tag override (example: v1.1.4). Leave empty to use v." + required: false + type: string jobs: publish: runs-on: ubuntu-latest permissions: - contents: read + contents: write id-token: write steps: @@ -28,6 +36,24 @@ jobs: node-version: 24 registry-url: 'https://registry.npmjs.org' + - name: Resolve release tag + id: release_tag + run: | + if [ -n "${{ inputs.tag }}" ]; then + TAG="${{ inputs.tag }}" + else + VERSION="$(node -p "require('./package.json').version")" + TAG="v${VERSION}" + fi + + if [[ ! "$TAG" =~ ^v[0-9].* ]]; then + echo "Resolved tag must start with 'v' (example: v1.1.4), got: $TAG" + exit 1 + fi + + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + echo "Using release tag: $TAG" + - name: Enable Corepack run: corepack enable @@ -43,10 +69,29 @@ jobs: - name: Build package run: yarn prepare - - name: Dry run publish (deploy-actions branch) - if: github.ref == 'refs/heads/deploy-actions' + - name: Publish to npm (dry-run) + if: ${{ inputs.deployment_mode == 'dry-run' }} run: npm publish --provenance --access public --dry-run - name: Publish to npm - if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' + if: ${{ inputs.deployment_mode == 'publish' }} run: npm publish --provenance --access public + + - name: Ensure git tag exists + if: ${{ inputs.deployment_mode == 'publish' }} + run: | + TAG="${{ steps.release_tag.outputs.tag }}" + git fetch --tags + if git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Tag $TAG already exists." + else + git tag "$TAG" + git push origin "$TAG" + fi + + - name: Create GitHub release + if: ${{ inputs.deployment_mode == 'publish' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ steps.release_tag.outputs.tag }} + generate_release_notes: true