Skip to content

Commit

Permalink
Merge pull request #28 from satyam-seth/package-publish-workflow
Browse files Browse the repository at this point in the history
Package publish workflow
  • Loading branch information
satyam-seth authored Oct 14, 2024
2 parents 87c3d79 + ac17dce commit 3e55a69
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 6 deletions.
40 changes: 39 additions & 1 deletion .github/workflows/basic-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 21 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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",
Expand Down

0 comments on commit 3e55a69

Please sign in to comment.