diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9c10c4..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 @@ -55,10 +52,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.head_ref || github.ref_name }} - 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: 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: @@ -66,3 +74,6 @@ jobs: - name: Deploy package to NPM run: yarn release --ci + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} 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",