updated actions

This commit is contained in:
Juanra Dikal 2021-03-25 13:59:44 +01:00
parent 88d3df6c33
commit f3e309072d
1 changed files with 65 additions and 48 deletions

View File

@ -27,55 +27,72 @@ jobs:
- name: install
run: npm ci
- name: lint
run: npm run lint
- name: build
run: npm run build
run: npm run build:js
- name: test
run: npm test
- name: docs
run: npm run docs
# publication:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
- name: browser tests
run: npm run test:browser
# - uses: EndBug/version-check@v1
# id: check
- name: node tests and coverage
run: npm run coverage
# - name: check version changes
# if: steps.check.outputs.changed == 'true'
# run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
publication:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# if: steps.check.outputs.changed == 'true'
# with:
# node-version: 14
# registry-url: https://registry.npmjs.org/
- uses: EndBug/version-check@v1
id: check
# - name: install
# if: steps.check.outputs.changed == 'true'
# run: npm ci
- name: check version changes
if: steps.check.outputs.changed == 'true'
run: 'echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
# - name: build
# if: steps.check.outputs.changed == 'true'
# run: npm run build
- uses: actions/setup-node@v1
if: steps.check.outputs.changed == 'true'
with:
node-version: 14
registry-url: https://registry.npmjs.org/
# - name: test
# if: steps.check.outputs.changed == 'true'
# run: npm test
- name: install
if: steps.check.outputs.changed == 'true'
run: npm ci
# - name: create code coverage report
# if: steps.check.outputs.changed == 'true'
# run: npm run coverage
- name: lint
if: steps.check.outputs.changed == 'true'
run: npm run lint
# - name: send report to coveralls.io
# if: steps.check.outputs.changed == 'true'
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
- name: build
if: steps.check.outputs.changed == 'true'
run: npm run build:js
# - name: publish to NPM
# if: steps.check.outputs.changed == 'true'
# run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: docs
if: steps.check.outputs.changed == 'true'
run: npm run docs
- name: browser tests
if: steps.check.outputs.changed == 'true'
run: npm run test:browser
- name: node tests and coverage
if: steps.check.outputs.changed == 'true'
run: npm run coverage
- name: send report to coveralls.io
if: steps.check.outputs.changed == 'true'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: publish to NPM
if: steps.check.outputs.changed == 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}