From ccee4f36c26055f3f3b2de57a98d7659d0254ef4 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 20:44:43 -0300 Subject: [PATCH 1/5] ci: configure git user and add environment variables for release - add step to initialize git user with name and email - include NPM_TOKEN and GH_TOKEN as environment variables for release step --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9c10c4..60082a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,11 @@ jobs: - name: Setup uses: ./.github/actions/setup + - name: Initialize Git user + run: | + git config --global user.name "Release Workflow" + git config --global user.email "${{ secrets.GIT_EMAIL }}" + - name: Initialize the NPM config run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN env: @@ -66,3 +71,6 @@ jobs: - name: Deploy package to NPM run: yarn release --ci + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} From da3ed3ac221d42312a0857587f8c882c1c0c39b0 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 20:50:34 -0300 Subject: [PATCH 2/5] ci: fetch full git history in ci workflow - add fetch-depth: 0 to checkout action - ensures all git history is available for subsequent steps --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60082a5..6c13f34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup uses: ./.github/actions/setup From d1351e4f96d9ffaee25be1786668be114bcdac53 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 20:53:40 -0300 Subject: [PATCH 3/5] ci: update checkout action configuration in ci workflow - add 'ref' parameter to the checkout action - set 'ref' to use either the head ref for pull requests or the ref name for other events --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c13f34..6ae2d3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + ref: ${{ github.head_ref || github.ref_name }} - name: Setup uses: ./.github/actions/setup From 557e23a7d917dd73b0f449613e9ecc6e97bcf0d4 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 21:00:29 -0300 Subject: [PATCH 4/5] ci: add github actions authentication step - configure git remote url with github token for authentication - ensure proper access for automated actions in the workflow --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ae2d3d..1cbb2c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,9 @@ jobs: git config --global user.name "Release Workflow" git config --global user.email "${{ secrets.GIT_EMAIL }}" + - name: Authenticate GitHub Actions + run: git remote set-url origin https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} + - name: Initialize the NPM config run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN env: From 45d0f639867b0986cbeb92bb1696058746a49d49 Mon Sep 17 00:00:00 2001 From: johelder Date: Sun, 15 Jun 2025 21:03:00 -0300 Subject: [PATCH 5/5] ci: remove pull_request trigger from ci workflow feat: bump version to 0.5.1 BREAKING CHANGE: ci workflow will no longer run on pull requests --- .github/workflows/ci.yml | 3 --- package.json | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cbb2c3..0c864f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,6 @@ on: push: branches: - main - pull_request: - branches: - - main merge_group: types: - checks_requested diff --git a/package.json b/package.json index 8a1be0e..078a2d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-input-code-otp", - "version": "0.4.0", + "version": "0.5.1", "description": "react-native-input-code-otp is a high-performance and fully customizable OTP input component for React Native, inspired by @shadcn/ui.", "source": "./src/index.tsx", "main": "./lib/commonjs/index.js",