From cda3d325bb4cb10caecdd862a52ea020f1771a1f Mon Sep 17 00:00:00 2001 From: Dexter Date: Mon, 13 Dec 2021 10:27:13 +0000 Subject: [PATCH] add publish workflow --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..45825f5e4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +--- +name: Publish + +"on": + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + registry-url: https://registry.npmjs.org/ + + - name: Install + run: | + npm ci + # - name: Lint + # run: | + # npm run lint + - name: Test + run: | + npm test + - name: Push release to npm (public) + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + run: | + npm publish --access public .