diff --git a/.github/workflows/deploy-npm.yml b/.github/workflows/deploy-npm.yml new file mode 100644 index 0000000..69c77b3 --- /dev/null +++ b/.github/workflows/deploy-npm.yml @@ -0,0 +1,28 @@ +on: + push: + branches: + - master +name: Build, Test and Publish npm +jobs: + publish: + name: Publish npm + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: '20.x' + always-auth: true + - name: Install Yarn + run: npm install -g yarn + - name: Install dependencies + run: yarn + - name: Build + run: yarn build + - name: Test + run: yarn test + - name: Publish + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + run: yarn publish --access public