diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..8c43585 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,29 @@ +name: Publish to NPM on Main Push + +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install Dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Publish to NPM + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}