From 2b59f3041733dd8c95a63621ac8752a2f3456c71 Mon Sep 17 00:00:00 2001 From: Naveen MR Date: Sun, 10 Oct 2021 08:13:14 +0100 Subject: [PATCH] chore : onChange to noco-i18n publish to new repo. Signed-off-by: Naveen MR --- .github/workflows/publish-noco-i18n.yml | 44 +++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-noco-i18n.yml diff --git a/.github/workflows/publish-noco-i18n.yml b/.github/workflows/publish-noco-i18n.yml new file mode 100644 index 0000000000..ab95163f73 --- /dev/null +++ b/.github/workflows/publish-noco-i18n.yml @@ -0,0 +1,44 @@ +name: "Publish : noco-i18n" + +on: + push: + branches: [ master ] + release: + types: [ published ] + +jobs: + copy-file: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Check for update + run: | + echo "CHANGED=$([[ $(lerna ls --since ${{github.event.before}} | grep noco-i18n) = noco-i18n ]] && echo 'OK')" >> $GITHUB_ENV + + - uses: actions/setup-node@v2 + if: ${{ env.CHANGED == 'OK' }} + with: + node-version: 14 + - name: Build docs + if: ${{ env.CHANGED == 'OK' || github.event_name == 'release' }} + run: | + cd packages/noco-i18n + npm install + npm run generate + + + - name: Pushes generated output + if: ${{ env.CHANGED == 'OK' || github.event_name == 'release' }} + uses: dmnemec/copy_file_to_another_repo_action@main + env: + API_TOKEN_GITHUB: ${{ secrets.GH_TOKEN }} + with: + source_file: 'packages/noco-i18n/dist/' + destination_repo: 'nocodb/noco-i18n' + destination_folder: '' + user_email: 'oof1lab@gmail.com' + user_name: 'o1lab' + commit_message: 'Autorelease from github.com/nocodb/nocodb/packages/noco-i18n'