From fe38903e4b5da7222d832427bad12e07b76de951 Mon Sep 17 00:00:00 2001 From: Daniel Sogl Date: Wed, 30 Oct 2019 16:43:05 +0100 Subject: [PATCH] chore(github): add publish action --- .github/workflows/npmpublish.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/npmpublish.yml diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml new file mode 100644 index 000000000..6925f3f5b --- /dev/null +++ b/.github/workflows/npmpublish.yml @@ -0,0 +1,38 @@ +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Install dependencies + run: npm ci + - name: Lint + run: npm run lint + - name: Build + run: npm run build + - name: Test + run: npm run test + - name: Readmes + run: npm run readmes + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm run shipit + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}