38 lines
907 B
YAML
38 lines
907 B
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
branches: [ 'master' ]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
LINGDOCS_DICTIONARY_URL: ${{ secrets.LINGDOCS_DICTIONARY_URL }}
|
|
LINGDOCS_NPM_TOKEN: ${{ secrets.LINGDOCS_NPM_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 16
|
|
- name: Check if version has been updated
|
|
id: check
|
|
uses: EndBug/version-check@v1
|
|
with:
|
|
diff-search: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Publish when version changed
|
|
if: steps.check.outputs.changed == 'true'
|
|
run: |
|
|
yarn install
|
|
cd src/lib
|
|
yarn install
|
|
cd ../components
|
|
yarn install
|
|
yarn build-library
|
|
yarn test
|
|
cd lib
|
|
npm publish
|
|
npm publish |