diff --git a/.github/workflows/basic-checks.yml b/.github/workflows/basic-checks.yml index 9d794cc..67c090a 100644 --- a/.github/workflows/basic-checks.yml +++ b/.github/workflows/basic-checks.yml @@ -18,7 +18,7 @@ jobs: - name: 'Setup node' uses: actions/setup-node@v3 with: - node-version: 17.9.1 + node-version: 20 - name: 'Install dependencies' run: npm ci @@ -34,3 +34,41 @@ jobs: - name: 'Run build' run: npm run build + + publish-npm: + name: 'Publish NPM 🚀' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + publish-gpr: + name: 'Publish GPR 📢' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: https://npm.pkg.github.com/ + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GPR_TOKEN}} diff --git a/package-lock.json b/package-lock.json index 63edbf2..9bd93bc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@satyam-seth/otp-field", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@satyam-seth/otp-field", - "version": "1.0.0", + "version": "1.0.1", "license": "ISC", "devDependencies": { "@types/chai": "^4.3.6", diff --git a/package.json b/package.json index 3ac58c5..13b0396 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,15 @@ { "name": "@satyam-seth/otp-field", - "version": "1.0.0", - "description": "A otp field build using ts and scss", + "version": "1.0.1", + "description": "A configurable OTP field built using TypeScript and SCSS", + "repository": { + "type": "git", + "url": "git+https://github.com/satyam-seth/otp-field.git" + }, + "bugs": { + "url": "https://github.com/satyam-seth/otp-field/issues" + }, + "homepage": "https://github.com/satyam-seth/otp-field#readme", "main": "dist/js/main", "typings": "dist/js/main", "scripts": { @@ -15,7 +23,17 @@ "test:unit": "mocha", "test:coverage": "nyc npm run test:unit" }, - "keywords": [], + "keywords": [ + "OTP", + "One Time Password", + "OTP Input", + "OTP Field", + "Verification code", + "Two-factor authentication", + "2FA", + "MFA", + "Authentication input" + ], "author": "", "license": "ISC", "types": "./dist/js/*.d.ts",