pashto-inflector/.github/workflows/publish.yml

39 lines
941 B
YAML
Raw Normal View History

2021-03-14 15:16:50 +00:00
name: Publish
2021-03-09 12:39:13 +00:00
on:
push:
2023-08-14 11:09:38 +00:00
branches: ["master"]
2021-03-09 12:39:13 +00:00
workflow_dispatch:
jobs:
2021-04-14 11:38:31 +00:00
publish:
2021-03-09 12:39:13 +00:00
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
steps:
2024-08-06 20:21:00 +00:00
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
2021-03-09 12:39:13 +00:00
with:
2024-08-06 20:21:00 +00:00
node-version: 20
cache: "yarn"
2021-03-14 15:13:07 +00:00
- name: Check if version has been updated
id: check
2024-08-06 20:21:00 +00:00
uses: EndBug/version-check@v2
2021-03-14 15:15:20 +00:00
with:
2021-03-14 15:23:55 +00:00
diff-search: true
2021-03-14 15:15:20 +00:00
token: ${{ secrets.GITHUB_TOKEN }}
2021-03-14 15:13:07 +00:00
- name: Publish when version changed
if: steps.check.outputs.changed == 'true'
run: |
2022-10-08 18:02:55 +00:00
yarn install-r
2021-03-14 15:13:07 +00:00
yarn build-library
2022-10-09 06:11:39 +00:00
yarn test --silent
2022-10-09 10:24:13 +00:00
cp .npmrc src/lib
cp .npmrc src/components
2022-10-09 10:07:21 +00:00
cd src/lib
npm publish
2022-10-08 17:01:33 +00:00
cd ../components
2023-08-14 11:09:38 +00:00
npm publish