2021-03-09 12:39:13 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-03-14 15:13:07 +00:00
|
|
|
branches: [ 'master' ]
|
2021-03-09 12:39:13 +00:00
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
LINGDOCS_DICTIONARY_URL: ${{ secrets.LINGDOCS_DICTIONARY_URL }}
|
2021-03-09 13:20:55 +00:00
|
|
|
LINGDOCS_NPM_TOKEN: ${{ secrets.LINGDOCS_NPM_TOKEN }}
|
2021-03-09 12:39:13 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [12.x, 14.x, 15.x]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2021-03-14 15:13:07 +00:00
|
|
|
- name: Check if version has been updated
|
|
|
|
id: check
|
|
|
|
uses: EndBug/version-check@v1
|
2021-03-14 15:15:20 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-03-14 15:13:07 +00:00
|
|
|
- name: Publish when version changed
|
|
|
|
if: steps.check.outputs.changed == 'true'
|
|
|
|
run: |
|
|
|
|
yarn install
|
|
|
|
yarn build-library
|
|
|
|
yarn test
|
|
|
|
npm publish
|