From 455547d1e555e3b3c22833005292a1768077c679 Mon Sep 17 00:00:00 2001 From: Bill D Date: Sun, 14 Mar 2021 19:13:07 +0400 Subject: [PATCH] update ci --- .github/workflows/{main.yml => ci.yml} | 2 +- .github/workflows/publish.yml | 33 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) rename .github/workflows/{main.yml => ci.yml} (95%) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/main.yml b/.github/workflows/ci.yml similarity index 95% rename from .github/workflows/main.yml rename to .github/workflows/ci.yml index dea52fc..4f39415 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/ci.yml @@ -25,4 +25,4 @@ jobs: - run: yarn install - run: yarn build-website - run: yarn build-library - - run: yarn test-ci \ No newline at end of file + - run: yarn test \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c42f8f1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: [ 'master' ] + + workflow_dispatch: + +jobs: + ci: + runs-on: ubuntu-latest + env: + LINGDOCS_DICTIONARY_URL: ${{ secrets.LINGDOCS_DICTIONARY_URL }} + LINGDOCS_NPM_TOKEN: ${{ secrets.LINGDOCS_NPM_TOKEN }} + 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 }} + - name: Check if version has been updated + id: check + uses: EndBug/version-check@v1 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Publish when version changed + if: steps.check.outputs.changed == 'true' + run: | + yarn install + yarn build-library + yarn test + npm publish \ No newline at end of file