diff --git a/.github/workflows/publish-to-gh-packages.yml b/.github/workflows/publish-to-gh-packages.yml new file mode 100644 index 0000000..46833af --- /dev/null +++ b/.github/workflows/publish-to-gh-packages.yml @@ -0,0 +1,27 @@ +name: Publish to GitHub Packages + +on: + push: + branches: + - main # Change this to your main branch name + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' + + - name: Install dependencies + run: npm install + + - name: Publish to GitHub Packages + run: npm publish --registry=https://npm.pkg.github.com/@devbabs --access public + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 50a9a86..d4d9212 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@devbabs/react-native-toast-alert", + "name": "react-native-toast-alert", "version": "0.1.5", "description": "My awesome react-native-toast-alert library", "main": "lib/commonjs/index", @@ -48,9 +48,6 @@ "url": "https://github.com/devbabs/react-native-toast-alert/issues" }, "homepage": "https://github.com/devbabs/react-native-toast-alert#readme", - "publishConfig": { - "registry": "https://npm.pkg.github.com/@devbabs" - }, "devDependencies": { "@release-it/conventional-changelog": "^5.0.0", "@types/jest": "^29.5.5",