Skip to content

Commit

Permalink
[chore]: unpublishing @razorpay/i18nify from npm registry
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-khanna committed Jan 3, 2024
1 parent 55218a6 commit 032b2a4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/unpublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: i18nify Unpublish

on:
workflow_dispatch:
push:

env:
GITHUB_ACCESS_TOKEN: ${{ secrets.CI_BOT_TOKEN }}

jobs:
unpublish:
name: Unpublish
runs-on: ubuntu-latest # nosemgrep: non-self-hosted-runner
steps:
- name: Checkout Codebase
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node v20
uses: actions/setup-node@v3
with:
node-version: 20.3.1
- name: Install dependencies
run: yarn
- name: Publish to public npm registry
env:
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: yarn publish-npm
4 changes: 1 addition & 3 deletions scripts/publishToNpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ const npmRcContent = `@razorpay:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=\${NPM_TOKEN}
`;

console.log('[i18nify]: Publishing on NPM ✨');

fs.writeFileSync(NPMRC_PATH, npmRcContent);

try {
execa.commandSync('npm publish --access public', {
execa.commandSync('npm unpublish -f @razorpay/i18nify', {
cwd: './',
stdio: 'inherit',
});
Expand Down

0 comments on commit 032b2a4

Please sign in to comment.