diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml new file mode 100644 index 0000000..022c8b0 --- /dev/null +++ b/.github/workflows/Publish.yml @@ -0,0 +1,32 @@ +name: 🚀 Publish to npm Registry + +on: + push: + branches: + - main + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: "https://registry.npmjs.org/" + + - name: Install dependencies + run: npm install + + - name: Build package + run: npm run build || echo "No build step" + + - name: Publish to npm + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}