From bc2d34d9d8aa103b0d69d385c71bb733e8be8393 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 9 Mar 2026 18:53:48 +0000 Subject: [PATCH 1/3] chore: Add missing types/node import Without this build fails. Was also missing from mono-repo copy commit because that file was in root --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 72b36e1..b5bb31d 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "@ionic/eslint-config": "^0.4.0", "@ionic/prettier-config": "^4.0.0", "@ionic/swiftlint-config": "^2.0.0", + "@types/node": "^24.10.1", "eslint": "^8.57.1", "prettier": "^3.6.2", "prettier-plugin-java": "^2.7.7", From fe3873511e3acdf3adff34259d293c491d41c834 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 9 Mar 2026 18:54:06 +0000 Subject: [PATCH 2/3] chore: Add .npmrc Brought from monorepo, also present in some other plugins. --- .npmrc | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..4cfe3ce --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +package-lock=false +provenance=true \ No newline at end of file From 574066a3f238f64968f4ec417ee490c83c431e44 Mon Sep 17 00:00:00 2001 From: OS-pedrogustavobilro Date: Mon, 9 Mar 2026 18:59:19 +0000 Subject: [PATCH 3/3] ci: Add basic continuous integration workflow --- .../actions/prepare-example-app/action.yml | 21 +++++++++ .github/actions/setup-tools/action.yml | 17 +++++++ .github/workflows/continuous_integration.yml | 45 +++++++++++++++++++ .github/workflows/reusable_build.yml | 33 ++++++++++++++ .github/workflows/reusable_lint.yml | 22 +++++++++ .github/workflows/reusable_setup.yml | 22 +++++++++ 6 files changed, 160 insertions(+) create mode 100644 .github/actions/prepare-example-app/action.yml create mode 100644 .github/actions/setup-tools/action.yml create mode 100644 .github/workflows/continuous_integration.yml create mode 100644 .github/workflows/reusable_build.yml create mode 100644 .github/workflows/reusable_lint.yml create mode 100644 .github/workflows/reusable_setup.yml diff --git a/.github/actions/prepare-example-app/action.yml b/.github/actions/prepare-example-app/action.yml new file mode 100644 index 0000000..40a39c7 --- /dev/null +++ b/.github/actions/prepare-example-app/action.yml @@ -0,0 +1,21 @@ +name: 'Prepare Example app' +description: 'Does necessary pre-work for the example app to compile natively' + +runs: + using: 'composite' + steps: + - name: 'Build plugin' + shell: bash + run: npm run build + - name: 'Install example app dependencies' + working-directory: ./example-app + shell: bash + run: npm i + - name: 'Build Web example app' + working-directory: ./example-app + shell: bash + run: npm run build + - name: 'Sync example app native platforms' + working-directory: ./example-app + shell: bash + run: npx cap sync diff --git a/.github/actions/setup-tools/action.yml b/.github/actions/setup-tools/action.yml new file mode 100644 index 0000000..92adeb7 --- /dev/null +++ b/.github/actions/setup-tools/action.yml @@ -0,0 +1,17 @@ +name: 'Setup Tools' +description: 'Setup tools needed in repo' + +runs: + using: 'composite' + steps: + - name: Install Node.js + uses: actions/setup-node@v6 + with: + node-version: 22 + # Ensure npm 11.5.1 or later is installed for Trusted publishing + - name: Update npm + shell: bash + run: npm install -g npm@latest + - name: Install dependencies + shell: bash + run: npm i diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml new file mode 100644 index 0000000..8afbace --- /dev/null +++ b/.github/workflows/continuous_integration.yml @@ -0,0 +1,45 @@ +name: "Continuous Integrations" + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - main + - next + - development + - '*.x' + +jobs: + setup: + uses: ./.github/workflows/reusable_setup.yml + + lint: + needs: 'setup' + uses: ./.github/workflows/reusable_lint.yml + + build: + needs: 'setup' + uses: ./.github/workflows/reusable_build.yml + + verify-plugin-android: + needs: ['setup', 'lint', 'build'] + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools + - name: 'Verify Android' + run: npm run verify:android + + verify-plugin-ios: + needs: ['setup', 'lint', 'build'] + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools + - name: 'Verify iOS' + run: npm run verify:ios diff --git a/.github/workflows/reusable_build.yml b/.github/workflows/reusable_build.yml new file mode 100644 index 0000000..6950b57 --- /dev/null +++ b/.github/workflows/reusable_build.yml @@ -0,0 +1,33 @@ +name: "Build Plugin" + +on: + workflow_call: + secrets: + THE_GH_RELEASE_TOKEN: + required: false + +jobs: + build: + runs-on: "ubuntu-24.04" + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + token: ${{ secrets.THE_GH_RELEASE_TOKEN || github.token }} + + - name: "Setup Tools" + uses: ./.github/actions/setup-tools + + - name: "Copy README.md in root" + run: cp README.md README.md.original + + - name: "Build Packages" + run: npm run build + + - name: "Check README.md changes" + run: | + if ! cmp --silent README.md README.md.original; then + echo "Detected README.md changes; Do 'npm run build' to update the docs." + exit 1 + fi diff --git a/.github/workflows/reusable_lint.yml b/.github/workflows/reusable_lint.yml new file mode 100644 index 0000000..7adb58f --- /dev/null +++ b/.github/workflows/reusable_lint.yml @@ -0,0 +1,22 @@ +name: "Lint Plugin" + +on: + workflow_call: + secrets: + THE_GH_RELEASE_TOKEN: + required: false + +jobs: + lint: + runs-on: 'macos-15' + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + with: + token: ${{ secrets.THE_GH_RELEASE_TOKEN || github.token }} + + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools + + - name: 'Lint Packages' + run: npm run lint diff --git a/.github/workflows/reusable_setup.yml b/.github/workflows/reusable_setup.yml new file mode 100644 index 0000000..dce558c --- /dev/null +++ b/.github/workflows/reusable_setup.yml @@ -0,0 +1,22 @@ +name: "Setup" + +on: + workflow_call: + secrets: + THE_GH_RELEASE_TOKEN: + required: false + +jobs: + setup: + strategy: + matrix: + os: ['ubuntu-24.04', 'macos-15'] + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + with: + token: ${{ secrets.THE_GH_RELEASE_TOKEN || github.token }} + + - name: 'Setup Tools' + uses: ./.github/actions/setup-tools \ No newline at end of file