diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..975161c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release NPM Package + +on: + push: + branches: + - main # Change this to your default branch + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: npm install + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }} + run: npm publish